Skip to content
English

A function that calls itself

  • Recursion is when a function calls itself.
  • Each call should work on a smaller version of the problem.
  • Done right, the problem shrinks until it is trivial to solve.
中文

调用自己的函数

  • 递归(recursion)就是一个函数调用它自己。
  • 每次调用都应处理这个问题的一个更小的版本。
  • 做对了的话,问题会不断缩小,直到简单到可以直接解决。

Handout

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩