Skip to content · ⁨본문 바로가기⁩
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.
한국어

자신을 호출하는 함수

  • **재귀(recursion)**는 함수가 같은 문제의 더 작은 버전을 해결하기 위해 자신自身을 호출하는 것입니다.
  • 두 부분이 필요합니다: 멈추게 하는 **기저 경우(base case)**와 문제를 축소시키는 재귀 경우(recursive case).
  • 기저 경우가 없으면 무한히 자신自身을 호출하여 충돌(crash)할 것입니다.

Handout · ⁨교재 자료⁩

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP