📚 Seth MB

Search

Search IconIcon to open search

Recursion

Last updated Jul 12, 2023 Edit

Recursion—Defining a subroutine in terms of itself. The subroutine calls itself.

Recursion ≠ iteration

Danger: the call stack may be exhausted

The call stack is a stack onto which we place a new stack frame each time a new subroutine is called. The stack frame contains information such as:

Programming