This site uses JavaScript for navigation, themes, and games like 2048. Please enable JavaScript in your browser settings, then reload the page.
11 problems. Click one to open the details.
0/11 solved
1.Max Sum Subarray of Size K (Brute)
Find the maximum sum of any contiguous subarray of size k with nested loops first.
2.Sliding Window: Fixed vs Variable
When the window size is fixed versus when left/right pointers expand and shrink by a condition.
3.Maximum Sum Subarray of Size K
O(n) fixed-window maximum sum using a running sum.
4.First Negative in Every Window of Size K
For every window of size k, report the first negative number (or 0 if none).
5.Count Occurrences of Anagrams
Count how many windows of the pattern's length are anagrams of the pattern.
6.Maximum of All Subarrays of Size K
Return the maximum of every contiguous window of size k using a monotonic deque.
7.Longest Subarray of Sum K
Longest contiguous subarray whose sum equals k (non-negative variant with sliding window).
8.Longest Substring with At Most K Unique Characters
Longest substring that contains at most k distinct characters.
9.Longest Substring Without Repeating Characters
Longest substring with all unique characters (at most 1 of each).
10.Pick Toys
John can pick toys of at most 2 types in a contiguous segment — longest such segment.
11.Minimum Window Substring
Smallest window in s that covers all characters of t (including duplicates).