Fibonacci
Visualize the tabulation approach to computing Fibonacci numbers using dynamic programming. Watch how each value is built from the two preceding values.
Time: O(n) | Space: O(n)
Controls
Range: 1 - 20
SlowMediumFast
dp[i] = dp[i-1] + dp[i-2] | dp[0] = 0, dp[1] = 1
🌀
Set a value for n and press Start to visualize the Fibonacci sequence.
Default
Active
Source (i-1, i-2)
Computed