Longest Repeating Character Replacement
Problem You are given a string s and an integer k. You can choose any character of the string and change it to any other uppercase English character. You can perform this operation at most k times. Re
Problem You are given a string s and an integer k. You can choose any character of the string and change it to any other uppercase English character. You can perform this operation at most k times. Re
Problem Given a string str and an integer K, return the length of the longest substring containing at most K distinct characters. A substring is a continuous part of the string. You cannot skip chara
Problem You are visiting a farm that has a single row of fruit trees arranged from left to right. The trees are represented by an integer array fruits where fruits[i] is the type of fruit the i<sup>th
Problem Given a binary array nums and an integer k, return the maximum number of consecutive 1's in the array if you can flip at most k 0's. (link) Example 1: Input: nums = [1,1,1,0,0,0,1,1,1,1,0], k
Problem Find the length of the longest substring without repeating characters. A substring is a continuous part of a string; characters cannot be skipped. View the problem on LeetCode. Examples Inp
Problem Given an array cardPoints, pick exactly k cards. Each pick must come from the beginning or the end of the remaining row. Return the maximum total score. (link) Examples cardPoints k Maximum
A sliding window keeps track of a continuous part of an array or string. The pointers l and r mark its boundaries; its length is r - l + 1. Pattern 1 - Fixed-size window Example: Find the maximum suba
Problem Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection li
Problem You are given the root of a binary search tree (BST), where the values of exactly two nodes of the tree were swapped by mistake. Recover the tree without changing its structure. (link) Example