Article

What is Recursion? | Concepts of Recursion

Written by Brain Mentors Pvt. Ltd.

Topic: Distance Learning and E-LearningPublished August 5, 2020
New ratings612 viewsSign in to rate

Why we need recursion?
Any problem can be solved by a recursive method as well as by the iterative method. But whenever we have a problem that is complex to do just by iterative/looping method. Then we are going to divide the problem into a smaller instance of the same problem that means we solve it by the recursive method.
What is call Stack?
A call stack is a stack data structure that is used to trace the sequence of the function call. When a function called then it’s get pushed inside the stack and when a function returns it popped out from the stack.

Three Concepts of Recursionr
Base Case (Terminating Case)
Small Problemr
Processing Logicr
Types of Recursion:
Tail Recursion:

If a recursive function is calling itself and that recursive call is the last statement in the function. After that call there is nothing, it is not performing anything.

Head Recursion:

If a recursive function is calling itself and that recursive call is the first statement in the function and some operations are performed after the call. The function doesn’t have a processor to perform any operation at the time of calling. It has to do everything at the time of returning.

Linear Recursion:

A linear recursive function is a function that only makes a single call to itself each time the function runs. It has something to process before and after the call.

Read Full Article Here – https://brain-mentors.com/what-is-recursion/

Article author

About the Author

BRAIN MENTORS Pvt. Ltd. started with a mission to link the IT industry and educational institutions. We aim to transform our every student into an IT professional who is ready to be employed in the industry.

Further reading

Further Reading

3 total

Article

Conceptual understanding is the bedrock of success in the challenging CA exams. Rote memorization might help in the short term, but a deep grasp of the underlying principles is essential for tackling complex questions, applying your knowledge effectively, and ultimately, excelling in your exams and career. This guide outlines strategies to cultivate a strong conceptual understanding for CA exams. I. Focus on the "Why" Not Just the "How" Go Beyond Formulas and Procedures: Don'

February 6, 2025

Article

Table of Contents Introduction Benefits of Online Education Current Trends in Online Learning Overcoming Challenges in Online Education Essential Strategies for Effective Online Learning The Role of Technology in Online Education Long-term Impacts of Online Learning Expert Insights and Recommendations Conclusion Introduction Online education has seen remarkable growth, offering flexibility and accessibility to learners worldwide. This educational trend has been seen prominent

November 16, 2024

Article

In today's global market, sustainable supply chain management is a crucial business practice. Companies are increasingly focusing on integrating eco-friendly and ethical standards into their operations to meet consumer demands and regulatory requirements. Oracle Fusion Supply Chain Management (SCM) plays a pivotal role in helping organizations achieve these sustainability goals. Through its robust features and capabilities, Oracle Fusion SCM enables businesses to streamline t

August 16, 2024