

BoundedBlockingQueue( int capacity ): Creates a queue of the given capacity.
Void Enqueue(int val): Adds an element to the end of the queue. If the queue is full, enqueue request gets blocked until the queue has no empty space i.e the element is stored at some other space and enqueued in the list when there is space in the queue.
Int Dequeue(): Returns the element at the front of the queue and blocks the dequeue request if there are no items in the queue until the queue has an element enqueued.
Int Size(): Returns the size of the queue.
You will be given ‘Q’ queries. You need to implement a bounded blocking queue according to those queries. Each query will belong to one of these two types:
0 ‘C’: Creates a queue of a capacity ‘C’.
1 ‘X’: Enqueue element ‘X’ into the end of the queue.
2: Dequeue the element at the front of the queue.
Returns -1 if the queue is empty, otherwise, returns the dequeued element.
3: Returns the size of the queue.
The first line contains ‘T’ denoting the number of the test cases.
Each of the test cases is described as:
The first line contains ‘Q’ denoting the number of queries to be answered.
The next ‘Q’ lines specify the type of query to be performed as mentioned above.
For each test case, for all the query of type:-
2: Return -1 if the queue is empty otherwise return the dequeued element.
3: Returns the size of the queue.
You do not need to print anything, it has already been taken care of. Just implement the given function.
1 <= T <= 10
1 <= Q <= 10^5
0 <= P <= 3
1 <= X <= 10^5
Where 'P’, denotes the type of query.‘X’ is the element to be enqueued in case the query type is ‘1’.
Time Limit : 1sec
Algorithm
2. Dequeue
3. Size