Concept Flow - Sliding Window Maximum Using Deque
Start
Initialize empty deque
For each element in array
Remove indices out of window from front
Remove smaller elements from back
Add current index to back
If window formed, record max from front
Repeat until end
Return max array
We slide a window over the array, keep useful elements in a deque, and record max from the front of the deque for each window.
