dsa2 min read
Diet Plan Performance [Easy] — Fixed Sliding Window
Count days with fixed-size window sums above upper and below lower thresholds using a sliding fixed window.
Read →
1575 articles
Count days with fixed-size window sums above upper and below lower thresholds using a sliding fixed window.
Compute the running sum of a 1D array where each element is the sum of itself and all previous elements.
Find the longest substring without duplicate characters using a HashSet-backed shrinkable sliding window.
Find the longest substring with at most k character replacements by tracking the maximum frequency char in the window.
Check if any permutation of s1 is a substring of s2 using a fixed-size sliding window with character frequency comparison.