Fibonacci sequence by recursive algorithm fail

04232015, 06:44 AM
Post: #16




RE: Fibonacci sequence by recursive algorithm fail
If you run a recursive program, at each recursive call, the environment is saved on a stack. But this stack can not grow dynamically, therefore if you want to do more embedded recursive calls, you must change the way evaluation is done (and save environment in the heap).


« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)