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