Relevant Patterns
#Study these pattern guides before tackling the problems. Understanding the core concepts will help you solve them more efficiently.
Practice Problems
#1
Max Sum Subarray of Size KEasy0
Show 2 hints
- Use a fixed-size window of k elements.
- Initialize the sum of the first k, then slide: subtract left, add right.
Medium#3
Show 2 hints
- Map char → last index; move left to max(left, lastIndex+1) on repeat.
- Window length is right-left+1; keep best seen.
Medium#438
Show 2 hints
- Window size equals pattern length; maintain frequency diff.
- When all counts are zero (or matched == uniqueChars), record left index.
Medium#424
Show 2 hints
- Track max frequency in current window.
- If window size − maxFreq > k, shrink left; answer is max window length.
Hard#76
Show 2 hints
- Maintain counts for required characters; decrement when matched.
- When need == 0, try to shrink from left while valid.
Track Your Progress
Mark problems as complete as you solve them. Come back anytime to continue where you left off.