Skip to content
Avio Lines
D6

Sliding Window

52 stations · 28h

Fixed 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 →
problems by zone (pattern)
  • Fixed Size Window2
  • Variable Size Window40
  • Count Subarrays (atMost trick)3
  • Window + HashMap22
  • Monotonic Deque Window5
  1. Fixed Size Window

    0 of 2 passed
  2. MediumGoogle · Amazon · +6 more companiesLeetCode ↗ (opens in a new tab)
  3. Variable Size Window

    0 of 40 passed
  4. MediumGoogle · Amazon · +15 more companiesLeetCode ↗ (opens in a new tab)
  5. HardGoogle · Amazon · +34 more companiesLeetCode ↗ (opens in a new tab)
  6. MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
  7. MediumGoogle · Meta · +2 more companiesLeetCode ↗ (opens in a new tab)
  8. MediumGoogle · Amazon · +6 more companiesLeetCode ↗ (opens in a new tab)
  9. MediumGoogle · Amazon · +18 more companiesLeetCode ↗ (opens in a new tab)
  10. MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
  11. MediumGoogle · Amazon · +19 more companiesLeetCode ↗ (opens in a new tab)
  12. MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
  13. HardGoogle · Amazon · +15 more companiesLeetCode ↗ (opens in a new tab)
  14. HardGoogle · Amazon · +15 more companiesLeetCode ↗ (opens in a new tab)
  15. MediumMicrosoft · Bloomberg · +1 more companiesLeetCode ↗ (opens in a new tab)
  16. Grumpy Bookstore OwnerLC 1052 · 29:24
    MediumAmazon · Meta · +5 more companiesLeetCode ↗ (opens in a new tab)
  17. MediumGoogle · Amazon · +7 more companiesLeetCode ↗ (opens in a new tab)
  18. MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  19. HardGoogle · Amazon · +6 more companiesLeetCode ↗ (opens in a new tab)
  20. MediumGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)
  21. Continuous SubarraysLC 2762 · 52:13
    MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
  22. Alternating Groups IILC 3208 · 42:56
    MediumGoogle · Microsoft · +4 more companiesLeetCode ↗ (opens in a new tab)
  23. MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
  24. Longest Nice SubarrayLC 2401 · 37:39
    MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
  25. MediumGoogle · Amazon · +5 more companiesLeetCode ↗ (opens in a new tab)
  26. MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  27. MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  28. Maximum Erasure ValueLC 1695 · 32:19
    MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
  29. Fruit Into BasketsLC 904 · 20:18
    MediumGoogle · Amazon · +11 more companiesLeetCode ↗ (opens in a new tab)
  30. MediumAmazon · Meta · +3 more companiesLeetCode ↗ (opens in a new tab)
  31. HardGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  32. MediumYelp · Wells Fargo · +1 more companiesLeetCode ↗ (opens in a new tab)
  33. Defuse the BombLC 1652 · 21:21
    EasyGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
  34. EasyGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  35. Count Subarrays (atMost trick)

    0 of 3 passed
  36. HardGoogle · Amazon · +8 more companiesLeetCode ↗ (opens in a new tab)
  37. HardGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
  38. Window + HashMap

    0 of 22 passed
  39. MediumGoogle · Amazon · +9 more companiesLeetCode ↗ (opens in a new tab)
  40. MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
  41. MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
  42. HardGoogle · Amazon · +15 more companiesLeetCode ↗ (opens in a new tab)
  43. HardGoogle · Amazon · +15 more companiesLeetCode ↗ (opens in a new tab)
  44. Permutation in StringLC 567 · 22:19
    MediumGoogle · Amazon · +14 more companiesLeetCode ↗ (opens in a new tab)
  45. MediumGoogle · Amazon · +6 more companiesLeetCode ↗ (opens in a new tab)
  46. MediumGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)
  47. MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
  48. MediumGoogle · Amazon · +5 more companiesLeetCode ↗ (opens in a new tab)
  49. MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  50. HardGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
  51. Maximum Erasure ValueLC 1695 · 32:19
    MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
  52. Fruit Into BasketsLC 904 · 20:18
    MediumGoogle · Amazon · +11 more companiesLeetCode ↗ (opens in a new tab)
  53. HardGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  54. Monotonic Deque Window

    0 of 5 passed
  55. Sliding Window MaximumLC 239 · 31:54
    HardGoogle · Amazon · +45 more companiesLeetCode ↗ (opens in a new tab)
  56. MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
  57. Continuous SubarraysLC 2762 · 52:13
    MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
  58. HardGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)

All 52 stations in order

  1. 1.Count Occurrences of Anagrams
  2. 2.Find All Anagrams in a String-(Amazon, Microsoft, Flipkart):Explanation ➕ Live Coding 🧑🏻‍💻👩🏻‍💻 (LeetCode 438)
  3. 3.Minimum Size Subarray Sum (LeetCode 209)
  4. 4.First negative integer in every window of size k-(Amazon,MentorGraphics):Explanation➕ Live Coding
  5. 5.Minimum Window Substring (LeetCode 76)
  6. 6.Contains Duplicate II (Sliding Window) -(Airbnb, Palantir Technologies): Explanation ➕ Live Coding (LeetCode 219)
  7. 7.Count Subarrays With Fixed Bounds (LeetCode 2444)
  8. 8.Maximum Number of Vowels in a Substring of Given Length (LeetCode 1456)
  9. 9.K Radius Subarray Averages (LeetCode 2090)
  10. 10.Longest Subarray of 1's After Deleting One Element (LeetCode 1493)
  11. 11.Maximize the Confusion of an Exam (LeetCode 2024)
  12. 12.Sliding Window Maximum (LeetCode 239)
  13. 13.Frequency of the Most Frequent Element (LeetCode 1838)
  14. 14.Count Complete Substrings (LeetCode 2953)
  15. 15.Binary Subarrays With Sum (LeetCode 930)
  16. 16.Subarray Product Less Than K (LeetCode 713)
  17. 17.Length of Longest Subarray With at Most K Frequency (LeetCode 2958)
  18. 18.Count Subarrays Where Max Element Appears at Least K Times (LeetCode 2962)
  19. 19.Subarrays with K Different Integers (LeetCode 992)
  20. 20.Subarrays with K Different Integers (LeetCode 992)
  21. 21.Get Equal Substrings Within Budget (LeetCode 1208)
  22. 22.Find Subarray With Bitwise AND Closest to K (LeetCode 3171)
  23. 23.Grumpy Bookstore Owner (LeetCode 1052)
  24. 24.Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit (LeetCode 1438)
  25. 25.Minimum Swaps to Group All 1's Together II (LeetCode 2134)
  26. 26.Count Substrings That Satisfy K-Constraint I & II (LeetCode 3258)
  27. 27.Permutation in String (LeetCode 567)
  28. 28.Find the Power of K-Size Subarrays I (LeetCode 3254)
  29. 29.Find the Power of K-Size Subarrays I (LeetCode 3254)
  30. 30.Shortest Subarray with Sum at Least K (LeetCode 862)
  31. 31.Maximum Sum of Distinct Subarrays With Length K (LeetCode 2461)
  32. 32.Take K of Each Character From Left and Right (LeetCode 2516)
  33. 33.Continuous Subarrays (LeetCode 2762)
  34. 34.Alternating Groups II (LeetCode 3208)
  35. 35.Count of Substrings Containing Every Vowel and K Consonants II (LeetCode 3306)
  36. 36.Number of Substrings Containing All Three Characters (LeetCode 1358)
  37. 37.Longest Nice Subarray (LeetCode 2401)
  38. 38.Count the Number of Good Subarrays (LeetCode 2537)
  39. 39.Count Complete Subarrays in an Array (LeetCode 2799)
  40. 40.Count Subarrays With Score Less Than K (LeetCode 2302)
  41. 41.Maximum Difference Between Even and Odd Frequency II (LeetCode 3445)
  42. 42.Reschedule Meetings for Maximum Free Time I (LeetCode 3439)
  43. 43.Maximum Erasure Value (LeetCode 1695)
  44. 44.Fruit Into Baskets (LeetCode 904)
  45. 45.Find X-Sum of All K-Long Subarrays II (LeetCode 3321)
  46. 46.Best Time to Buy and Sell Stock using Strategy (LeetCode 3652)
  47. 47.Divide an Array Into Subarrays With Minimum Cost II (LeetCode 3013)
  48. 48.Minimum Number of Flips to Make the Binary String Alternating (LeetCode 1888)
  49. 49.Shortest and Lexicographically Smallest Beautiful String (LeetCode 2904)
  50. 50.Find Two Non-overlapping Sub-arrays Each With Target Sum (LeetCode 1477)
  51. 51.Defuse the Bomb (LeetCode 1652)
  52. 52.Minimum Recolors to Get K Consecutive Black Blocks (LeetCode 2379)