Skip to content

Files

Latest commit

907de9f · May 2, 2025

History

History
113 lines (98 loc) · 8.21 KB

sliding-window-problems.md

File metadata and controls

113 lines (98 loc) · 8.21 KB

Sliding Window

Fixed Size Window

Problem Difficulty
1456. Maximum Number of Vowels in a Substring of Given Length Medium (1263)
@@1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold Medium (1317)
2090. K Radius Subarray Averages Medium (1358)
1876. Substrings of Size Three with Distinct Characters Easy
219. Contains Duplicate II Easy
438. Find All Anagrams in a String Medium
567. Permutation in String Medium
2461. Maximum Sum of Distinct Subarrays With Length K Medium (1552)
1423. Maximum Points You Can Obtain from Cards Medium (1573)
@@1652. Defuse the Bomb Easy (1416)

Longest Window

Problem Difficulty
3. Longest Substring Without Repeating Characters Medium
@@1695. Maximum Erasure Value Medium (1528)
@@1493. Longest Subarray of 1's After Deleting One Element Medium (1423)
1004. Max Consecutive Ones III Medium (1656)
424. Longest Repeating Character Replacement Medium
904. Fruit Into Baskets Medium (1516)
@@2779. Maximum Beauty of an Array After Applying Operation Medium (1638)

TODO: Add the definition of * Window: ... for each problem below.

Shortest Window

Problem Difficulty
209. Minimum Size Subarray Sum Medium
76. Minimum Window Substring Hard
@@1234. Replace the Substring for Balanced String Medium (1877)

Subarray Count

越長越合法

Problem Difficulty
@@3325. Count Substrings With K-Frequency Characters I Medium (1454)
@@2799. Count Complete Subarrays in an Array Medium (1397)

越短越合法

Problem Difficulty
713. Subarray Product Less Than K Medium

General Sliding Window

Problem Difficulty
239. Sliding Window Maximum Hard

Explanation