Minimum Window Subsequence
Problem You are given two strings, s1 and s2. Your task is to find the smallest substring in s1 such that s2 appears as a subsequence within that substring. The characters of s2 must appear in the sa
Problem You are given two strings, s1 and s2. Your task is to find the smallest substring in s1 such that s2 appears as a subsequence within that substring. The characters of s2 must appear in the sa
Problem Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is included in the window. If there is
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