Skip to interview prep
Apexed

18. What is a deque and where is it useful?

EasyQueues

Technical
Show model answer

A double-ended queue allows insertion and removal at both ends in O(1). It powers sliding-window maximum (monotonic deque), palindrome checks, 0-1 BFS and work-stealing schedulers.

What is a deque and where is it useful — Data structures & algorithms interview question — Apexed