What is the data structures used to perform recursion?
Answer Posted / 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 View All Answers
Are linked lists useful?
What is a simple graph?
What is the minimum number of queues that can be used to implement a priority queue?
How many null values are allowed in a set?
Why do we use arrays?
Define adjacent nodes?
which is the simplest file structure? (Sequential, indexed, random)
How does variable declaration affect memory allocation?
Can treemap have null values?
Which is better hashset or treeset?
What is the use of sorting?
Is priority queue sorted?
What is perfect binary tree?
What is difference between an Array and ArrayList?
How do you get placements?