Quiz: Monotonic Deque

Test your understanding

Check Your Understanding

In Sliding Window Maximum, why use a deque instead of a heap?

  1. A.Heap doesn't support maximum queries
  2. B.Deque uses less memory
  3. C.Deque allows O(1)O(1) removal of out-of-window elements from the front
  4. D.Deque allows removal of elements that are out of window and that can never be maximum
Start the roadmap to answer the quizzes and solve the challenges