Skip to content

Recursion: base case and recursive case

Handout

A function that calls itself

  • Recursion is when a function calls itself to solve a smaller version of the same problem.
  • It needs two parts: a base case that stops, and a recursive case that shrinks the problem.
  • Without a base case, it would call itself forever and crash.

Handout

Log in or create account

IGCSE & A-Level