Computer Science Medium css pms

Which data structure is most suitable for implementing recursion?

  • A Queue
  • B Array
  • C Stack
  • D Heap
Correct Answer: Option C — Stack
Explanation: Recursion relies on the call stack to store function calls, local variables, and return addresses. Every recursive call creates a new stack frame, which is removed when the function returns. This makes the stack the fundamental data structure behind recursion.
Related MCQs