What is the data structure used to perform recursion?
Answers
Answered by
6
Stack. Because of its LIFO (Last In First Out) property it remembers its 'caller' so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls. Every recursive function has itsequivalent iterative (non-recursive) function.
Similar questions