Base case

The base case is the condition that stops further recursion.

This is the simplest instance of the problem, for which the answer is already known.

Without a base case, recursion would continue indefinitely, leading to a stack overflow error.

Related concepts

Base case — Structure map

Clickable & Draggable!

Base case — Related pages: