본문 바로가기

Recursion: base case and recursive case

English

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.

교재 자료

로그인 또는 계정 만들기

IGCSE, A-Level & AP