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

What is dangling pointer and how to avoid it?

0 Answers  


Is treeset thread safe?

0 Answers  


What is the capacity of arraylist?

0 Answers  


Which is faster hashmap or concurrenthashmap?

0 Answers  


Describe the degree term in a tree.

0 Answers  






Difference between abstract data type, data type and data structure?

0 Answers  


List the data structures which are used in network data modal.

0 Answers  


Difference between arraylist and linkedlist?

0 Answers  


Why is treeset sorted?

0 Answers  


Why do we use binary search?

0 Answers  


What is binary tree and its types?

0 Answers  


What is pivot in quicksort?

0 Answers  


Categories