Skip to content

Commit fbff53e

Browse files
committed
fix dfs.md syntax issue
1 parent b1a8c1b commit fbff53e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/cheatsheet/dfs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ private void dfs(int[][] heights, boolean[][] reachable, int y, int x) {
16811681

16821682
reachable[y][x] = true;
16831683

1684-
int[][] directions = new int[][]{{0, 1}, {1, 0}, {-1, 0}, {0, -1}};
1684+
int[][] directions = new int[][]{ {0, 1}, {1, 0}, {-1, 0}, {0, -1} };
16851685
for (int[] dir : directions) {
16861686
int newY = y + dir[0];
16871687
int newX = x + dir[1];
@@ -1771,7 +1771,7 @@ private void reveal_1(char[][] board, int x, int y) {
17711771
* and avoid unnecessary recursion.
17721772
*
17731773
* - 3) board[x][y] != 'E'
1774-
* • Avoids re-processing non-E' cells
1774+
* • Avoids re-processing non-'E' cells
17751775
* • The board can have:
17761776
* • 'M' → Mine (already handled separately)
17771777
* • 'X' → Clicked mine (game over case)

0 commit comments

Comments
 (0)