// TOPIC
#sliding-window
3 articles
◆BeginnerAmazonGoogle
01Deques (Double-Ended Queues)
A deque gives you O(1) push and pop from both ends — and the sliding-window-maximum trick that turns O(n²) brute-force problems into clean O(n) solutions.
#deques#queues#stacks
12 min◆◆◆AdvancedAmazonGoogle
02Monotonic Queue: Sliding Window Maximum in O(n)
Learn the monotonic queue: the deque discipline that solves Sliding Window Maximum in O(n) and collapses windowed DP like Jump Game VI from O(nk) to O(n).
#monotonic-queue#deques#sliding-window
18 min◆◆IntermediateAmazonGoogle
03The Sliding Window Pattern
Learn the sliding window technique: solve longest/shortest subarray and substring problems in O(n) with the expand-right, shrink-left template.
#sliding-window#two-pointers#arrays
11 min