10000 refactor 286 · nabinkumar/Leetcode@d24e60b · GitHub
[go: up one dir, main page]

Skip to content

Commit d24e60b

Browse files
refactor 286
1 parent 7638268 commit d24e60b

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
2626
*/
2727
public class _286 {
28-
class BFSSolutionWithoutQueue {
28+
public static class Solution1 {
2929

3030
int[] dirs = new int[]{0, 1, 0, -1, 0};
3131

@@ -57,7 +57,7 @@ void bfs(int[][] rooms, int i, int j, int m, int n) {
5757

5858
}
5959

60-
class BFSSolutionWithAQueue {
60+
public static class Solution2 {
6161

6262
//push all gates into the queue first, and then put all its neighbours into the queue with one distance to the gate, then continue to push the rest of the nodes into the queue, and put all their neighbours into the queue with the nodes' value plus one until the queue is empty
6363
int[] dirs = new int[]{0, 1, 0, -1, 0};

0 commit comments

Comments
 (0)
0