AlgoScope

Base Case

States whose values are known without recursion. They seed the table.

Dynamic programming, analysis, beginner
Cell 0, 0 is a base case with 1 path.01230121
Cell 0, 0 is a base case with 1 path.01230121

DP on a Grid: Paths on a 3 x 4 grid

Step, step 2 of 14

(0, 0) is on the top row: the only way in is straight along the edge, so exactly 1 path. A base case, known without any rule.

Cost

Space
O(1)

Leads to

Topics that need this one first.

Taught by the same lesson

DP on a Grid covers these too, in the same run.