M Mac Player macrumors regular Jan 19, 2006 225 0 Jul 23, 2009 #26 kpua said: @gnasher Your recursive implementation is O(n), where an implementation using memoization is amortized O(1) (assuming fib() is called approximately n times). Click to expand... Assuming you know the largest m for which fib() will be called.
kpua said: @gnasher Your recursive implementation is O(n), where an implementation using memoization is amortized O(1) (assuming fib() is called approximately n times). Click to expand... Assuming you know the largest m for which fib() will be called.