top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Which data structure is applied when dealing with a recursive function?

+2 votes
772 views
Which data structure is applied when dealing with a recursive function?
posted May 15, 2015 by Mohammed Hussain

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
Recursive function is just an approach to solve problem but we can not decide which data structure to use for recursive function.

1 Answer

0 votes

Recursion, which is basically a function that calls itself based on a terminating condition, makes use of the stack. Using LIFO, a call to a recursive function saves the return address so that it knows how to return to the calling function after the call terminates.

answer May 20, 2015 by Manikandan J
Similar Questions
+3 votes

What data structure would you mostly likely see in a non recursive implementation of a recursive algorithm?

+3 votes

What are the necessary and sufficient conditions after which we can call a DS as queue.

+2 votes

getRandom() should pick a "random" element from your data structure, and should not be predictable (for instance always picking the "first" element from your DS)

...