Inplace stack reversal(recursive)
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 -
I know it is wrong and in effect clears the stack and then pushes them back in the same order. Can anyone give me any hints or tips on how to approach this ? any help will be appreciated, thanks!
void ReverseStack(Stack& intStack)
int temp = intStack.Pop();