Skip to content

Recursion: base case and recursive case

Handout

A method that calls itself

  • Recursion is when a method calls itself to solve a smaller piece of the same problem.
  • On the AP CSA exam you mostly trace recursion (follow the calls by hand). Writing small recursive methods helps you trace well.
  • Every recursive method needs two parts: a base case and a recursive case.

Handout

Log in or create account

IGCSE & A-Level