Available question text
Design a data structure that supports push and pop at the front, middle, and back of a sequence (when length is even, the middle is the frontmost of the two middle positions), returning -1 for pops on an empty queue. The challenge is to maintain the sequence so these operations behave correctly and efficiently across up to 1000 calls.
Related questions
Continue with questions that share topics or the same question type.
- Delete the Middle Node of a Linked List
Coding
- Design a Deque (Double-Ended Queue)
Coding
- Design Bounded Blocking Queue
Coding
- Design Circular Queue
Coding · Array · Design · Linked List
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1670. Design Front Middle Back Queue
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source