Design Circular Deque
Design a deque of capacity k backed by a ring. Operations: insertFront x, insertLast x, deleteFront, deleteLast, getFront, getRear, isEmpty, isFull. Insert and delete print true or false for success; getFront and getRear print the value or -1 when empty.
Constraints
1 <= k <= 1000 At most 2000 operations
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.