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 |
What is difference between hashmap and treemap?
What is minimum depth of binary tree?
What is an iterative algorithm?
What are the data structures used in RDBMS, Network data model & Hierarchical data model?
What are the applications of stack?
Can you dynamically allocate arrays in expanded memory?
What is stack in data structure with the example?
Why do we need arrays if all the operations that are performed on arrays can be performed on arraylist?
Differentiate between singly and doubly linked lists?
What is sorting an array?
What is a dequeue?
How will you represent a linked list in a graphical view?