← Quiz: Queues and Deques: all 13 questions
Quiz: Queues and Deques · Question 5 of 13
In sliding window maximum, the deque holds indexes whose values are:
In sliding window maximum, the deque holds indexes whose values are:
- A.increasing from front to back
- B.decreasing from front to back
- C.in random order
- D.all equal
Answer & explanation
Correct answer: decreasing from front to back
Smaller values behind a bigger, newer one are removed, so the front is always the maximum.
Can you get the rest right without peeking?
Take the timed Quiz: Queues and Deques quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →