Please implement the 3 basic operations of circular queue, i.e., push, pop, and front.
Note that a circular queue with capacity n can only contain n-1 elements.
#include <stack> or <queue> are not allowed.
The first line of input contains a 32-bit integer to specify the capacity of circular queue.
The capacity of the circular queue is only specified in the first line of the input and occurs only once.
Then, there are a number of circular queue operations (<50000) specified in the subsequent input lines.
The corresponding outputs are detailed below.
"push j": Push element j into the circular queue, where j is a 32-bit integer.
We do not need to output anything if this operation is successfully carried out.
However, if the circular queue is full, output "Full" and do nothing to the queue.
"pop": Pop one element from the circular queue.
We do not need to output anything if this operation is successfully carried out.
We do not need to output anything when the circular queue is empty.
"front": Output the front element of the queue. Output "Empty" and do nothing to the queue if the queue is empty.