dsa2 min read
Max Consecutive Ones III [Medium] — Sliding Window with K Zeros
Find the maximum number of consecutive 1s achievable by flipping at most k zeros, using a variable sliding window.
Read →
webcoderspeed.com
1276 articles
Find the maximum number of consecutive 1s achievable by flipping at most k zeros, using a variable sliding window.
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.