Recursion !

Smith Flores
Nov 3, 2021

--

What is recursion?

Recursion is called a process by which a function calls itself repeatedly, until a certain condition is satisfied, if there is no specific case that terminates the recursion, an infinite loop could be created.

Example:

Calculate the power of a number using recursion:

Now let’s see how this would look step by step using stack and LIFO method:

Final result = 25

I hope you enjoyed reading this blog and learned what you need to know about recursion

A dream doesn’t magically come true, it takes sweat, determination and hard work — Colin Powell

--

--