2
votes
Vote UpVote

Generating Fibonacci numbers in Delphi: Recursive and iterative algorithms

Yanniel's notes – In this post, I want to implement a function that returns the Nth Fibonacci number. Initially, I will provide a recursive implementation that derives directly from the Fibonacci sequence definition. Afterwards, I will recode the same function using an iterative approach.Why do I want to do (share) such a thing? Well, firstly for fun :-) and secondly, because I was asked to do something similar in one phone screen interview. Really? Yep, I was asked to code a function to return the factorial of a number and then, I had to read it over the phone. I implemented the recursive algorithm. At this ...
Favorite? Off-Topic? Yanniel @ 2011-11-30 17:43

Statistics

Visits: 689
Votes: 2
Favorites: 1
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Jeroen Pluimers
stukelly
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)