63. Unique Paths II

Medium — DP with Obstacles

Click any cell to toggle obstacle. Press "Play" to walk the DP.
Tip: click cells to toggle obstacles. Start/end cells cannot be toggled while playing.

Step

0 / 0

Cell

--

Formula

--

Result

--
Current cell
Above
Left
Obstacle
Algorithm Complexity
2D DP
O(mn) / O(mn)
Time / Space: O(mn) / O(mn)
1D DP
O(mn) / O(n)
Time / Space: O(mn) / O(n)