Inplace stack reversal(recursive)

Hi,

We had an assignment to reverse a stack "in place" using recursion. The following member functions are available- IsFull(),IsEmpty(), Push(),Pop(),Top(). I've been thinking about this for a long time but I just cant get it. Here is what I have -

You could reverse in place with a double ended queue. Reversing in place with a stack is already wrong because it's not really possible. As to why your code doesn't work, well stacks are usually LIFO, so try it where the first pop is the bottom of the new stack. You'll find that even implemented recursively it's the same as with a while.