Q063 Unique Paths II
The only difference compared to Q060
for those positions obstacle[i][j] == 1 has an obstacle, there is no path to go there, so we should put pathsToPosition[i][j] == 0
https://github.com/Sylvia-YiyinShen/Algorithm/blob/master/DynamicProgramming/Q063UniquePathsII.playground/Contents.swift
No comments:
Post a Comment