educative.io

About the Recursion with Data Structures - Solution Review: Reverse a Stack category


#1

This review provides a detailed analysis of the solution to reverse a stack using recursion.

View the lesson here.


#2

This solution is not better in terms of memory, it only doesn’t use another copy of stack. The extra memory is in the form of multiple function calls and single variables all over the place.