Which Data Structure Is Used for Implementing Recursion?

Which Data Structure Is Used for Implementing Recursion?

The compiler uses a stack to implement recursion.

Which data structure is used for implementation recursion?

Explanation: Since function calls are executed in Last In First Out order, stack is the data structure for converting recursive to iterative implementation.

Which data structure is used for implementing recursion MCQ?

Answers. 1) (b) Stack data structure is used to perform recursion. Recursion use system stack for storing the return addresses of the function calls. So, Stack data structure is used to implement recursive function calls.

Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.