Blog
Tutorials, guides, and insights to help you become a better developer.
Two pointers, one pass, O(n) — learn how the variable-size sliding window grows and shrinks to solve substring and subarray problems efficiently.
AdminAugust 2, 20264 min read
Sliding window maximum is the classic follow-up to every sliding window problem. Learn the monotone deque pattern in JavaScript with LeetCode 239, 1438, and 1696.
AdminAugust 2, 20268 min read
Stop re-summing from scratch — the fixed-size sliding window reduces O(n·k) nested loops to a single O(n) pass by adding one element and dropping one.
AdminAugust 2, 20264 min read