How do I write a program to compute run-time of a recursive and non-recursive functions to find the 43rd Fibonacci number?
DS9596
0
Junior Poster in Training
Recommended Answers
Jump to PostWhat have you done, besides posting your homework assignment?Show your code to us and pinpoint the errors you have.We will be more than happy to help.
Jump to PostCan you start the non-recusive function ... show what you can do ... so we can see what you are missing ... hopefully ... not everything :)
Jump to Postrubberman: I thought so too, but then I checked using Python (which has bigints), and it turns out that's not the case. Fibonacci numbers do grow quite rapidly, but not quite that rapidly; fib(43) is around 400 million, which will fit a 32-bit signed value.
memo = …
All 12 Replies
ddanbe
2,724
Professional Procrastinator
Featured Poster
David W
131
Practically a Posting Shark
Schol-R-LEA
1,446
Commie Mutant Traitor
Featured Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
Schol-R-LEA
1,446
Commie Mutant Traitor
Featured Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
DS9596
0
Junior Poster in Training
Schol-R-LEA
1,446
Commie Mutant Traitor
Featured Poster
DS9596
0
Junior Poster in Training
DS9596
0
Junior Poster in Training
Schol-R-LEA
1,446
Commie Mutant Traitor
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.