DDSA Solutions

Recursion

12 problems

Recursion solves a problem by calling itself with a smaller sub-problem. Every recursive solution needs: a base case (to stop) and a recursive case (to reduce). Stack space is O(depth). Convert deep recursion to iteration with an explicit stack when stack overflow is a concern.