Lecture notes

contents


Overview

Definition of recursion

The definition of an operation in terms of itself

  • Building a loop by having a method calling itself
  • Requires:
    • A Base Case (stopping criterion)
    • Self invocation with parameters closer and closer to the base-case

Mutual recursion

Definition

More than one method that call each other

Example: method to determine if a number is even or odd

Efficiency in recursion

  • р

Key takeaways

  • a

Lecture slides