File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
algorithms/graphs/min_cost_valid_path Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 77Given an m x n grid. Each cell of the grid has a sign pointing to the next cell you should visit if you are currently
88in this cell. The sign of grid[ i] [ j ] can be:
99
10- - 1 which means go to the cell to the right. (i.e go from grid[ i] [ j ] to grid[ i] [ j + 1 ] )
11- - 2 which means go to the cell to the left. (i.e go from grid[ i] [ j ] to grid[ i] [ j - 1 ] )
12- - 3 which means go to the lower cell. (i.e go from grid[ i] [ j ] to grid[ i + 1] [ j ] )
13- - 4 which means go to the upper cell. (i.e go from grid[ i] [ j ] to grid[ i - 1] [ j ] )
10+ - 1 which means go to the cell to the right. (i.e., go from ` grid[i][j] ` to ` grid[i][j + 1] ` )
11+ - 2 which means go to the cell to the left. (i.e., go from ` grid[i][j] ` to ` grid[i][j - 1] ` )
12+ - 3 which means go to the lower cell. (i.e., go from ` grid[i][j] ` to ` grid[i + 1][j] ` )
13+ - 4 which means go to the upper cell. (i.e., go from ` grid[i][j] ` to ` grid[i - 1][j] ` )
1414
1515> Notice that there could be some signs on the cells of the grid that point outside the grid.
1616
You can’t perform that action at this time.
0 commit comments