Recursion relies on the stack's _______ behavior to manage function calls and their respective _______.

  • FIFO (First-In-First-Out)
  • LIFO (Last-In-First-Out)
  • Priority
  • Random
Recursion relies on the stack's LIFO (Last-In-First-Out) behavior. When a function calls itself, each subsequent call is placed on the stack, and the last-called function is processed first, managing the flow of recursive calls.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *