---
# System prepended metadata

title: Reversing a queue

---

# Reversing a queue

## Write a algorithm which reverses a queue with following three operations: 

1. enqueue(x) : Add an item x to end of queue.
2. dequeue() : Remove an item from front of queue.
3. empty() : Checks if a queue is empty or not.

### Your Answer

```go=



```


