COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
Which data structure is mainly used for implementing the recursive algorithm?
|
Queue
|
|
Stack
|
|
Array
|
|
List
|
Explanation:
Detailed explanation-1: -Explanation: Since function calls are executed in Last In First Out order, stack is the data structure for converting recursive to iterative implementation.
Detailed explanation-2: -Array: In array implementation, the stack is formed using an array. All the operations are performed using arrays. You will see how all operations can be implemented on the stack in data structures using an array data structure.
Detailed explanation-3: -In short, the Data Structure used for Recursion is Stack (LIFO) Data Structure.
Detailed explanation-4: -Explanation-Stacks are used for the implementation of Recursion.
There is 1 question to complete.