DSA Studio
Search
Home
Sign in
Monotonic Structures Checkpoint
Stacks and deques that stay sorted.
1. For next greater element, the stack should be:
Decreasing by value
Increasing by value
Sorted by index only
Random
2. When popping a bar at index i in the histogram algorithm, width is:
right - left - 1
right + left + 1
right - left + 1
left - right - 1
3. Each index is pushed/popped at most once, so total time is:
4. For sliding window maximum, the deque stores values in:
Decreasing order
Increasing order
Random order
Order of arrival only
Submit quiz
Auto-advance on pass