Recursion
Aug 25, 2024 · 5 min read · Introduction
Recursion
When a function calls itself
until a specified condition is met.
f(){
print(1);
f();
}
Stack Space
Base Case
The condition that stops the recursion is called the base case.
//cnt is a global variable
f(){
if(...