Design a circular queue (ring buffer) with a fixed capacity k. A circular queue reuses freed space at the front, so it never needs to shift elements.
enQueue(value)inserts an element; returnstrueif successful,falseif the queue is full.deQueue()removes an element from the front; returnstrueif successful,falseif the queue is empty.Front()returns the front element, or-1if empty.Rear()returns the last element, or-1if empty.isEmpty()returns whether the queue is empty.isFull()returns whether the queue is full.
Implement the function circularQueue(k, operations) where k is the capacity and operations is a list of [op, ...args]: ["enQueue", v], ["deQueue"], ["Front"], ["Rear"], ["isEmpty"], ["isFull"]. Return the list of results, one per operation (use null for operations that return nothing - though every operation here returns a value).