Home
Topics
Practice
Roadmap
DSA Tracker
Code Editor
Tech Blogs
More
Sign in
Get started
Loading question...
Feedback
Unique Paths II
Hard
00:00
0 users online
Share
Description
Solution
Submissions
Discussion
Find number of unique paths from top-left to bottom-right in grid with obstacles.
Sample Input:
[[0,0,0],[0,1,0],[0,0,0]]
Sample Output:
2
Hints
Hint 1
Use dynamic programming
Hint 2
DP[i][j] = paths to reach cell (i,j)
Hint 3
Set DP[i][j] = 0 if cell has obstacle
Code Editor
Reset
Run
Save
Loading...