Tabulation
Bottom-up filling of the table in an order where dependencies are already computed.
Decision · step 7 of 14DP on a Grid: Paths on a 3 x 4 grid
(1, 1) can be entered from above, 1 way, or from the left, 1 way. Those are disjoint, so 1 + 1 = 2.
What you will see
READ dependencies -> COMPUTE -> FILL, cell after cell in dependency order.
Cost
| Space | O(states) |
|---|
How you work with it here
play it through, step one change at a time, scrub to any step, run it on your own input, predict what happens next.
Screen readers: Table cells announce their state and value; each step announces which cells were read and the value written.
Reduced motion: Dependency arrows appear statically and the cell value crossfades.
Before this
Related
Leads to
Topics that need this one first.
Taught by the same lesson
DP on a Grid covers these too, in the same run.