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
Is vector a collection?
How many parts are there in a declaration statement using data structures?
How would you check if a binary tree is BST or not ? Write a program.
What is a circular singly linked list?
What is data structure and why we need it?
How does sort function work?
Is quicksort divide and conquer?
Is hashtable fail fast?
What is circular linked list?
Are linked lists considered linear or non-linear data structure?
Define a full binary tree ?
Can arraylist be empty?
Which is faster binary or linear search?
What does a treemap do?
How do you access the values within an array?