Math Fundamentals18 sections · 814 units
Open in Course

Lessons from Unique Paths II

(Counting with constraints)

1.1. Constraints (like obstacles) modify the DP formula by setting certain states to 0.

2.2. Always check edge cases: blocked start or end means 0 paths.

3.3. The base case initialization must respect obstacles (you cannot propagate through a blocked cell).

These grid counting techniques appear in robotics, game design, and pathfinding algorithms. You now understand the pattern.