Circular Queue with Fixed Capacity
Design a circular queue with fixed capacity k supporting enQueue x, deQueue, Front, Rear, isEmpty and isFull. enQueue and deQueue print true on success and false otherwise. Front and Rear print the element or -1 if the queue is empty. isEmpty and isFull print true or false.
Constraints
1 <= k <= 1000 At most 3000 operations
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.