Skip to content

Commit 69549f5

Browse files
refactor 529
1 parent bb343cc commit 69549f5

File tree

1 file changed

+2
-0
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+2
-0
lines changed

src/main/java/com/fishercoder/solutions/_529.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ public char[][] updateBoard(char[][] board, int[] click) {
103103
} else {
104104
/**There is no mines around this cell, so update it to be 'B'*/
105105
board[currRow][currCol] = 'B';
106+
107+
/**then we'll also check all of its four surrounding cells, if it's 'E'. we'll also update it to be 'B' and offer it into the queue*/
106108
for (int i = -1; i < 2; i++) {
107109
for (int j = -1; j < 2; j++) {
108110
if (i == 0 && j == 0) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy