Which is a common use-case of Deque in algorithm design?

  1. Priority sorting
  2. Depth-first traversal
  3. Sliding window problems
  4. Sorting data
Correct answer Sliding window problems

Explanation

Deque is widely used in sliding window problems for optimal time complexity.

Update: Admin added a tag on this question

Topics

By Admin · · 27 views