Stack 5
Stack 5
• Principles of recursion
2 2
Meaning of Recursion
• Recursion is an important concept in computer science.
• The process in which a function calls itself directly or
indirectly is called recursion and the corresponding
function is called a recursive function. A recursive
function, then, is a function that calls itself.
• A recursive function involves a recursive call and a base
case. A recursive call is the part of the function body
that calls itself until a specified condition is met, while
the base case is the function’s stopping point. It is
important that we have a base case because without it,
we would be stuck in an infinite loop.
Importance of Recursion
For queries
Email: [email protected]
15