Which of the following data structures is used in implementing recursive calls?
2018
Which of the following data structures is used in implementing recursive calls?
- A.
Queue
- B.
Binary Tree
- C.
Stack
- D.
Hash Table
Attempted by 780 students.
Show answer & explanation
Correct answer: C
Recursive calls are implemented using a stack data structure because of the Last-In-First-Out (LIFO) behavior needed for managing function call frames. Each invocation adds a frame to the stack, which is popped upon return.