Fibonacci 3: bottom-up table
Turn it around: fill the answers from the bottom up, each from the two before it.
n5
The two base cases go in first: dp[0] = 0 and dp[1] = 1.
Table dp[0..5]: 0, 1.
- compare
- swap or write
- settled
Space play · ← → step · Home End jump · drag the strip to scrub