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 the use of placement new?

0 Answers  


Can we use any class as map key?

0 Answers  


What is the difference between collection and collections?

0 Answers  


Define quadratic probing?

0 Answers  


Explain what is linear search?

0 Answers  






What do you mean by data and data structure?

0 Answers  


Which is faster hashset or treeset?

0 Answers  


Explain what is the data structures used to perform recursion?

0 Answers  


How do you sort an array by value?

0 Answers  


What is bubble insertion selection sort?

0 Answers  


Draw a binary Tree for the expression : A * B - (C + D) * (P / Q)

0 Answers  


Can we add duplicate keys in a hashmap?

0 Answers  


Categories