Lesson 9 of 24
Recursion
10 min 30 XP
Recursion-ൽ base case നിർത്തുന്നതുവരെ function ചെറിയ input-ൽ സ്വയം call ചെയ്യുന്നു. Tower of Hanoi ക്ലാസിക് ഉദാഹരണമാണ്: n disks-ന് 2ⁿ - 1 moves വേണം.
Example: edit me and press Run
Output Loading C++ (first time takes a few seconds)
Press Run to see the result here.