Any idea as to how to write a simple algorithm to reverse elements in a queue?