What's your favorite implementation of producing the fibonacci sequence?
- by Terry Donaghe
Best, most creative, most clever, fastest, smallest, written in weirdest language, etc etc.
For those not familiar with this staple of programming exam question / interview question, check this out:
Fibonacci Sequence at Wikipedia
The question would be, write a simple program which will spit out the first n digits of the Fibonacci sequence.
So, if n == 12, we produce:
0 1 1 2 3 5 8 13 21 34 55 89 144
Your implementation becomes more interesting when you set n to larger values. How long does it take your implementation to return a 25 digit sequence? How about 100?