Unique Paths to Goal
Explore how to determine unique paths for a robot navigating a grid with obstacles. Understand naive recursive methods and improve solutions with top-down memoization and bottom-up tabulation dynamic programming approaches, optimizing time and space complexity.
Statement
Given a robot located at the top-left corner of an matrix, determine the number of unique paths the robot can take from start to finish while avoiding all obstacles on the matrix.
The robot can only move either down or right at any time. The robot tries to reach the bottom-right corner of the matrix.
An obstacle is marked as 1, and an unoccupied space is marked as 0 in the matrix.
Constraints:
mmatrix.lengthnmatrix[i].lengthmatrix[i][j]is either1or0m, n...