由买买提看人间百态

topics

全部话题 - 话题: currentcol
(共0页)
p*****p
发帖数: 379
1
来自主题: JobHunting版 - 这题就够凶残的了吧
刚写了个,上个部分代码
private enum Direction {LEFT, RIGHT, UP, DOWN};
private static float getCurrentPathMax(int currentRow, int currentCol, int[]
[] maze, int[][] visited, Direction lastStep) {
int rows = maze.length, cols = maze[0].length;

if (currentRow < 0 || currentRow >= rows || currentCol < 0 || currentCol
>= cols) {
return -1;
}

if (maze[currentRow][currentCol] == 0) {
// blank
if (visited[currentRow][currentCol] == 3) {
return 0;
... 阅读全帖
(共0页)