Data structures used to perform the recursion

Name the data structures which are used to perform the recursion?

E

Expert

Verified

The data structures which are used to perform the recursion are Stack. Since of its LIFO (Last in First Out) property it remembers its 'caller' therefore knows whom to return when the function has to return. The recursion makes use of system stack for storing the return addresses of function calls.

Each and every recursive function consists of its equivalent iterative (non-recursive) function. Even when these equivalent iterative procedures are written, explicit stack is to be employed.

   Related Questions in Data Structure & Algorithms

©TutorsGlobe All rights reserved 2022-2023.