Data structures used to perform recursion

Which one data structures used to perform recursion?

E

Expert

Verified

Stack. Due to its Last in First out (LIFO) property this remembers its 'caller' that knows whom to return while the function has to return. Recursion utilizes system stack for storing the return addresses of the certain function calls.
All recursive functions have its equivalent iterative (i.e. non-recursive) function. Even though such equivalent iterative processes are written, explicit stack is to be utilized.

   Related Questions in Data Structure & Algorithms

©TutorsGlobe All rights reserved 2022-2023.