Fixed Window
while expand
Naïve Sum/Average
Max Sum Subarray of size K
643. Maximum Average Subarray I
Easy·
Solutions:
FIG. 643 MAXIMUM AVERAGE SUBARRAY I● INTERACTIVE
1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold
Medium·
Solutions:
FIG. 1343 NUMBER OF SUB ARRAYS OF SIZE K AND AVERAGE GREATER THAN OR EQUAL TO THRESHOLD● INTERACTIVE
2090. K Radius Subarray Averages
Medium·
Solutions:
FIG. 2090 K RADIUS SUBARRAY AVERAGES● INTERACTIVE
1423. Maximum Points You Can Obtain from Cards
Medium·
Solutions:
FIG. 1423 MAXIMUM POINTS YOU CAN OBTAIN FROM CARDS● INTERACTIVE
1176. Diet Plan Performance
1052. Grumpy Bookstore Owner
1652. Defuse the Bomb
Hashmap
187. Repeated DNA Sequences
Hashmap - Duplicate Elements
219. Contains Duplicate II
217. Contains Duplicate
Hashmap - Unique/Distinct Elements
1876. Substrings of Size Three with Distinct Characters
Easy·
Solutions:
FIG. 1876 SUBSTRINGS OF SIZE THREE WITH DISTINCT CHARACTERS● INTERACTIVE
1852. Distinct Numbers in Each Subarray
Medium·
Solutions:
FIG. 1852 DISTINCT NUMBERS IN EACH SUBARRAY● INTERACTIVE
2107. Number of Unique Flavors After Sharing K Candies
Medium·
Solutions:
FIG. 2107 NUMBER OF UNIQUE FLAVORS AFTER SHARING K CANDIES● INTERACTIVE
1100. Find K-Length Substrings With No Repeated Characters
Medium·
Solutions:
FIG. 1100 FIND K LENGTH SUBSTRINGS WITH NO REPEATED CHARACTERS● INTERACTIVE
Substrings of length k with k-1 distinct elements
Medium·
Solutions:
FIG. SUBSTRINGS K 1 DISTINCT● INTERACTIVE
2461. Maximum Sum of Distinct Subarrays With Length K
Medium·
Solutions:
FIG. 2461 MAXIMUM SUM OF DISTINCT SUBARRAYS WITH LENGTH K● INTERACTIVE
2841. Maximum Sum of Almost Unique Subarray
Medium·
Solutions:
FIG. 2841 MAXIMUM SUM OF ALMOST UNIQUE SUBARRAY● INTERACTIVE
1297. Maximum Number of Occurrences of a Substring
Medium·
Solutions:
FIG. 1297 MAXIMUM NUMBER OF OCCURRENCES OF A SUBSTRING● INTERACTIVE
Hashmap - Anagrams/Permutations
438. Find All Anagrams in a String
Medium·
Solutions:
FIG. 438 FIND ALL ANAGRAMS IN A STRING● INTERACTIVE
242. Valid Anagram
567. Permutation in String
Count
2379. Minimum Recolors to Get K Consecutive Black Blocks
Easy·
Solutions:
FIG. 2379 MINIMUM RECOLORS TO GET K CONSECUTIVE BLACK BLOCKS● INTERACTIVE
1456. Maximum Number of Vowels in a Substring of Given Length
Medium·
Solutions:
FIG. 1456 MAXIMUM NUMBER OF VOWELS IN A SUBSTRING OF GIVEN LENGTH● INTERACTIVE
Count - Math
1550. Three Consecutive Odds
2269. Find the K-Beauty of a Number
Easy·
Solutions:
FIG. 2269 FIND THE K BEAUTY OF A NUMBER● INTERACTIVE
Count - Swaps
1151. Minimum Swaps to Group All 1's Together
Medium·
Solutions:
FIG. 1151 MINIMUM SWAPS TO GROUP ALL 1S TOGETHER● INTERACTIVE
2134. Minimum Swaps to Group All 1's Together II
Medium·
Solutions:
FIG. 2134 MINIMUM SWAPS TO GROUP ALL 1S TOGETHER II● INTERACTIVE
Heap
239. Sliding Window Maximum
Deque
First negative in every window of size k
Sorting
1984. Minimum Difference Between Highest and Lowest of K Scores
Easy·
Solutions:
FIG. 1984 MINIMUM DIFFERENCE BETWEEN HIGHEST AND LOWEST OF K SCORES● INTERACTIVE
Bit Manipulation
3023. Find Pattern in Infinite Stream I
Medium·
Solutions:
FIG. 3023 FIND PATTERN IN INFINITE STREAM I● INTERACTIVE
3037. Find Pattern in Infinite Stream II
Hard·
Solutions:
FIG. 3037 FIND PATTERN IN INFINITE STREAM II● INTERACTIVE
Miscellaneous
30. Substring with Concatenation of All Words
Hard·
Solutions:
FIG. 30 SUBSTRING WITH CONCATENATION OF ALL WORDS● INTERACTIVE