Multiple choice

Which of the following data structures is used to perform recursion?

  1. Queue

  2. Stack

  3. Tree

  4. Linked list

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Stack is used to perform recursion. It stores the function call in stack. then call each function in LIFO order. Let a function is called from its own body then for to track the function call, each call is pushed into stack till the end of counter then one by one each function call is executed. So, stack is a correct answer.