template
void n2front (queue
that moves the nth element (counting from the front, which is element 1)
of the queue to the front, leaving the order of all other elements
unchanged. The function throws the rangeError exception if n < 1 or n>
q.size(). The figure illustrates the action of n2front() for an integer
queue and n = 4.
n = 4 (4th element of queue)
Before
8 5 17 3 7
front back
After
3 8 5 17 7
front back
Please provide a complete program if it makes sense.
