D6
Sliding Window
52 stations · 28hFixed and variable windows over arrays and strings. 52 interview problems explained by codestorywithMIK (28h of video), grouped into 5 patterns such as Fixed Size Window, Variable Size Window, Count Subarrays (atMost trick).
Start this line →- Fixed Size Window2
- Variable Size Window40
- Count Subarrays (atMost trick)3
- Window + HashMap22
- Monotonic Deque Window5
Fixed Size Window
0 of 2 passed- Maximum Sum of Distinct Subarrays With Length KLC 2461 · 19:53MediumGoogle · Amazon · +6 more companiesLeetCode ↗ (opens in a new tab)
Variable Size Window
0 of 40 passed- Minimum Size Subarray SumLC 209 · 18:40MediumGoogle · Amazon · +15 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Window SubstringLC 76 · 38:06HardGoogle · Amazon · +34 more companiesLeetCode ↗ (opens in a new tab)
- Contains Duplicate II (Sliding Window) -(Airbnb, Palantir Technologies): Explanation ➕ Live CodingLC 219 · 16:17EasyGoogle · Amazon · +12 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Number of Vowels in a Substring of Given LengthLC 1456 · 13:01MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- K Radius Subarray AveragesLC 2090 · 18:21MediumGoogle · Meta · +2 more companiesLeetCode ↗ (opens in a new tab)
- Longest Subarray of 1's After Deleting One ElementLC 1493 · 33:30MediumGoogle · Amazon · +6 more companiesLeetCode ↗ (opens in a new tab)
- Maximize the Confusion of an ExamLC 2024 · 41:16MediumGoogle · Amazon · +18 more companiesLeetCode ↗ (opens in a new tab)
- Binary Subarrays With SumLC 930 · 36:48MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Subarray Product Less Than KLC 713 · 16:55MediumGoogle · Amazon · +19 more companiesLeetCode ↗ (opens in a new tab)
- Length of Longest Subarray With at Most K FrequencyLC 2958 · 21:52MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Subarrays with K Different IntegersLC 992 · 35:08HardGoogle · Amazon · +15 more companiesLeetCode ↗ (opens in a new tab)
- Subarrays with K Different IntegersLC 992 · 29:18HardGoogle · Amazon · +15 more companiesLeetCode ↗ (opens in a new tab)
- Get Equal Substrings Within BudgetLC 1208 · 20:10MediumMicrosoft · Bloomberg · +1 more companiesLeetCode ↗ (opens in a new tab)
- Grumpy Bookstore OwnerLC 1052 · 29:24MediumAmazon · Meta · +5 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Swaps to Group All 1's Together IILC 2134 · 25:58MediumGoogle · Amazon · +7 more companiesLeetCode ↗ (opens in a new tab)
- Count Substrings That Satisfy K-Constraint I & IILC 3258 · 1:08:16EasyLeetCode ↗ (opens in a new tab)
- Find the Power of K-Size Subarrays ILC 3254 · 20:23MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Shortest Subarray with Sum at Least KLC 862 · 35:37HardGoogle · Amazon · +6 more companiesLeetCode ↗ (opens in a new tab)
- Take K of Each Character From Left and RightLC 2516 · 35:44MediumGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)
- Continuous SubarraysLC 2762 · 52:13MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Alternating Groups IILC 3208 · 42:56MediumGoogle · Microsoft · +4 more companiesLeetCode ↗ (opens in a new tab)
- Number of Substrings Containing All Three CharactersLC 1358 · 20:41MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Longest Nice SubarrayLC 2401 · 37:39MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Count the Number of Good SubarraysLC 2537 · 21:21MediumGoogle · Amazon · +5 more companiesLeetCode ↗ (opens in a new tab)
- Count Complete Subarrays in an ArrayLC 2799 · 19:01MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Reschedule Meetings for Maximum Free Time ILC 3439 · 25:45MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Erasure ValueLC 1695 · 32:19MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Fruit Into BasketsLC 904 · 20:18MediumGoogle · Amazon · +11 more companiesLeetCode ↗ (opens in a new tab)
- Find X-Sum of All K-Long Subarrays IILC 3321 · 1:02:46HardGoogle · BloombergLeetCode ↗ (opens in a new tab)
- Best Time to Buy and Sell Stock using StrategyLC 3652 · 37:42MediumAmazon · Meta · +3 more companiesLeetCode ↗ (opens in a new tab)
- Divide an Array Into Subarrays With Minimum Cost IILC 3013 · 55:15HardGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Shortest and Lexicographically Smallest Beautiful StringLC 2904 · 23:59MediumYelp · Wells Fargo · +1 more companiesLeetCode ↗ (opens in a new tab)
- Find Two Non-overlapping Sub-arrays Each With Target SumLC 1477 · 27:15MediumGoogleLeetCode ↗ (opens in a new tab)
- Defuse the BombLC 1652 · 21:21EasyGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Recolors to Get K Consecutive Black BlocksLC 2379 · 19:14EasyGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
Count Subarrays (atMost trick)
0 of 3 passed- Count Subarrays With Fixed BoundsLC 2444 · 28:17HardGoogle · Amazon · +8 more companiesLeetCode ↗ (opens in a new tab)
- Count Subarrays Where Max Element Appears at Least K TimesLC 2962 · 36:06MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Count Subarrays With Score Less Than KLC 2302 · 19:52HardGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
Window + HashMap
0 of 22 passed- Find All Anagrams in a String-(Amazon, Microsoft, Flipkart):Explanation ➕ Live Coding 🧑🏻💻👩🏻💻LC 438 · 6:24MediumGoogle · Amazon · +12 more companiesLeetCode ↗ (opens in a new tab)
- Contains Duplicate II (Sliding Window) -(Airbnb, Palantir Technologies): Explanation ➕ Live CodingLC 219 · 16:17EasyGoogle · Amazon · +12 more companiesLeetCode ↗ (opens in a new tab)
- Frequency of the Most Frequent ElementLC 1838 · 57:25MediumGoogle · Amazon · +9 more companiesLeetCode ↗ (opens in a new tab)
- Binary Subarrays With SumLC 930 · 36:48MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Length of Longest Subarray With at Most K FrequencyLC 2958 · 21:52MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Subarrays with K Different IntegersLC 992 · 35:08HardGoogle · Amazon · +15 more companiesLeetCode ↗ (opens in a new tab)
- Subarrays with K Different IntegersLC 992 · 29:18HardGoogle · Amazon · +15 more companiesLeetCode ↗ (opens in a new tab)
- Permutation in StringLC 567 · 22:19MediumGoogle · Amazon · +14 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Sum of Distinct Subarrays With Length KLC 2461 · 19:53MediumGoogle · Amazon · +6 more companiesLeetCode ↗ (opens in a new tab)
- Take K of Each Character From Left and RightLC 2516 · 35:44MediumGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)
- Number of Substrings Containing All Three CharactersLC 1358 · 20:41MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Count the Number of Good SubarraysLC 2537 · 21:21MediumGoogle · Amazon · +5 more companiesLeetCode ↗ (opens in a new tab)
- Count Complete Subarrays in an ArrayLC 2799 · 19:01MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Difference Between Even and Odd Frequency IILC 3445 · 1:09:08HardGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Erasure ValueLC 1695 · 32:19MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Fruit Into BasketsLC 904 · 20:18MediumGoogle · Amazon · +11 more companiesLeetCode ↗ (opens in a new tab)
- Find X-Sum of All K-Long Subarrays IILC 3321 · 1:02:46HardGoogle · BloombergLeetCode ↗ (opens in a new tab)
- Divide an Array Into Subarrays With Minimum Cost IILC 3013 · 55:15HardGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Find Two Non-overlapping Sub-arrays Each With Target SumLC 1477 · 27:15MediumGoogleLeetCode ↗ (opens in a new tab)
Monotonic Deque Window
0 of 5 passed- Sliding Window MaximumLC 239 · 31:54HardGoogle · Amazon · +45 more companiesLeetCode ↗ (opens in a new tab)
- Find the Power of K-Size Subarrays ILC 3254 · 16:43MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Continuous SubarraysLC 2762 · 52:13MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Find X-Sum of All K-Long Subarrays IILC 3321 · 1:02:46HardGoogle · BloombergLeetCode ↗ (opens in a new tab)
- Divide an Array Into Subarrays With Minimum Cost IILC 3013 · 55:15HardGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
All 52 stations in order
- 1.Count Occurrences of Anagrams
- 2.Find All Anagrams in a String-(Amazon, Microsoft, Flipkart):Explanation ➕ Live Coding 🧑🏻💻👩🏻💻 (LeetCode 438)
- 3.Minimum Size Subarray Sum (LeetCode 209)
- 4.First negative integer in every window of size k-(Amazon,MentorGraphics):Explanation➕ Live Coding
- 5.Minimum Window Substring (LeetCode 76)
- 6.Contains Duplicate II (Sliding Window) -(Airbnb, Palantir Technologies): Explanation ➕ Live Coding (LeetCode 219)
- 7.Count Subarrays With Fixed Bounds (LeetCode 2444)
- 8.Maximum Number of Vowels in a Substring of Given Length (LeetCode 1456)
- 9.K Radius Subarray Averages (LeetCode 2090)
- 10.Longest Subarray of 1's After Deleting One Element (LeetCode 1493)
- 11.Maximize the Confusion of an Exam (LeetCode 2024)
- 12.Sliding Window Maximum (LeetCode 239)
- 13.Frequency of the Most Frequent Element (LeetCode 1838)
- 14.Count Complete Substrings (LeetCode 2953)
- 15.Binary Subarrays With Sum (LeetCode 930)
- 16.Subarray Product Less Than K (LeetCode 713)
- 17.Length of Longest Subarray With at Most K Frequency (LeetCode 2958)
- 18.Count Subarrays Where Max Element Appears at Least K Times (LeetCode 2962)
- 19.Subarrays with K Different Integers (LeetCode 992)
- 20.Subarrays with K Different Integers (LeetCode 992)
- 21.Get Equal Substrings Within Budget (LeetCode 1208)
- 22.Find Subarray With Bitwise AND Closest to K (LeetCode 3171)
- 23.Grumpy Bookstore Owner (LeetCode 1052)
- 24.Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit (LeetCode 1438)
- 25.Minimum Swaps to Group All 1's Together II (LeetCode 2134)
- 26.Count Substrings That Satisfy K-Constraint I & II (LeetCode 3258)
- 27.Permutation in String (LeetCode 567)
- 28.Find the Power of K-Size Subarrays I (LeetCode 3254)
- 29.Find the Power of K-Size Subarrays I (LeetCode 3254)
- 30.Shortest Subarray with Sum at Least K (LeetCode 862)
- 31.Maximum Sum of Distinct Subarrays With Length K (LeetCode 2461)
- 32.Take K of Each Character From Left and Right (LeetCode 2516)
- 33.Continuous Subarrays (LeetCode 2762)
- 34.Alternating Groups II (LeetCode 3208)
- 35.Count of Substrings Containing Every Vowel and K Consonants II (LeetCode 3306)
- 36.Number of Substrings Containing All Three Characters (LeetCode 1358)
- 37.Longest Nice Subarray (LeetCode 2401)
- 38.Count the Number of Good Subarrays (LeetCode 2537)
- 39.Count Complete Subarrays in an Array (LeetCode 2799)
- 40.Count Subarrays With Score Less Than K (LeetCode 2302)
- 41.Maximum Difference Between Even and Odd Frequency II (LeetCode 3445)
- 42.Reschedule Meetings for Maximum Free Time I (LeetCode 3439)
- 43.Maximum Erasure Value (LeetCode 1695)
- 44.Fruit Into Baskets (LeetCode 904)
- 45.Find X-Sum of All K-Long Subarrays II (LeetCode 3321)
- 46.Best Time to Buy and Sell Stock using Strategy (LeetCode 3652)
- 47.Divide an Array Into Subarrays With Minimum Cost II (LeetCode 3013)
- 48.Minimum Number of Flips to Make the Binary String Alternating (LeetCode 1888)
- 49.Shortest and Lexicographically Smallest Beautiful String (LeetCode 2904)
- 50.Find Two Non-overlapping Sub-arrays Each With Target Sum (LeetCode 1477)
- 51.Defuse the Bomb (LeetCode 1652)
- 52.Minimum Recolors to Get K Consecutive Black Blocks (LeetCode 2379)