Lesson 9 of 24
Recursion
10 min 30 XP
Recursion ನಲ್ಲಿ function base case ನಿಲ್ಲಿಸುವವರೆಗೆ ಚಿಕ್ಕ 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.