Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
senthadev
· 12y ago · 0 comments
You should try to implement the Fib with tail call and then test it.
http://en.wikipedia.org/wiki/Tail_call
Comments
[–]
dozzie
12y ago
First he should implement it properly, remembering last two values at any time. His way is just plain outrageous.
[–]
rjoshi
12y ago
Here the comparison is not about the algorithm, but language with similar recursion logic.
[–]
dozzie
12y ago
Then he should have used appropriate function to calculate, Ackermann for instance.