How we Reverse the Queue ?
Basically, there are many method to reverse the array or queue.
Here, we reverse the queue with the use of the stack.
-Dequeue the Queue and push in stack until queue is empty
-then enqueue the queue by pop the stack until stack is empty
Following is the function which reverse the queue with the help of the queue :