What is the data structures used to perform recursion?



What is the data structures used to perform recursion?..

Answer / phool chand

Stack. Because of its LIFO (Last In First Out) property it remembers its ‘caller’ so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls. Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

Different Types of pattern?

0 Answers   Wipro,


What is the advantage of the heap over a stack?

0 Answers  


How do you search for a target key in a linked list?

0 Answers  


What happens if we try to insert duplicate key in hashmap?

0 Answers  


Which sorting is best in time complexity?

0 Answers  


What is dynamic data structure?

1 Answers  


Why linked lists are better than arrays?

0 Answers  


What is difference between stack and queue?

0 Answers  


How does a selection sort work?

0 Answers  


What does the dummy header in the linked list contain?

0 Answers  


Is hashmap sorted?

0 Answers  


What is the basic of data structure?

0 Answers  


Categories