Is there any algorithm to compute the nth fibonacci number in sub linear time?
相关问题
- Faster loop: foreach vs some (performance of jsper
- Why wrapping a function into a lambda potentially
- Finding k smallest elements in a min heap - worst-
- binary search tree path list
- High cost encryption but less cost decryption
相关文章
- What are the problems associated to Best First Sea
- ceil conterpart for Math.floorDiv in Java?
- Coin change DP solution to keep track of coins
- why 48 bit seed in util Random class?
- Algorithm for partially filling a polygonal mesh
- Robust polygon normal calculation
- DOM penalty of using html attributes
- Which is faster, pointer access or reference acces
One of the exercises in SICP is about this, which has the answer described here.
In the imperative style, the program would look something like