Direct vs. Indirect Recursion

This lesson explains two different types of recursion: direct and indirect recursion.

Direct Recursion

Direct recursion occurs when a method calls itself.

This results in a one-step recursive call: the method makes a recursive call inside its own body.

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.