✏️ Explanatory Question
Direct recursion occurs when a function directly calls itself from inside its own body.
void A() {
A(); // direct recursion
}
Indirect recursion occurs when one function calls another function, and that second function again calls the first function.
void A() {
B();
}
void B() {
A();
}