Write code to solve the following problems using the ADTs for stacks and queues as discussed in class. In both instances, S is a stack and Q is a queue.
while (!Q.Empty ()) S.Push (Q.DeQue ()); while (!S.Empty ()) Q.EnQue (S.Pop ());
while (!S.Empty ()) Q.EnQue (S.Pop ()); while (!Q.Empty ()) S.Push (Q.DeQue ());