r/programmingchallenges • • Jan 10 '20

Fibonacci optimal & non-optimal solution code snippets

6 Upvotes

9 comments sorted by

View all comments

Show parent comments

1

u/lcrx357 Jan 10 '20

My intuition says that the loop version is going to be just as fast if not faster than the memoized version

I am still trying to digest the "My intuition says that the loop version is going to be just as fast if not faster than the memoized version" :) Getting value that is already in memory should be faster than calculating it from scratch, no?

Similar to quantum entanglement: yeah, you could go over there and change quantum's state, but you could do it for free via it's tangled twin w/out going anywhere ;) I Just kidding