Title: Recursion and Stacks Basics
Course: CPS 261: Advanced Java Concepts ~ DL & MM MASTER > Section: Learning Units - Bb

Presentations and Videos

- Recursion and Stacks Basics lecture video (Time: 48:50)
- Recursion and Stacks Basics document

- In this lecture we discuss recursion and the alternatives to recursion (often the alternative is using a stack).
- We start out with Factorial and Fibonacci problems. Using recursion with Fibonacci has a performance flaw that is demonstrated. In the lecture we show you how to compensate for the performance flaw in the recursive Fibonacci solution.
- The Knapsack problem is solved using recursion and using a stack.