LeetCode
Unique Paths III
Click
here
for an explanation.