There was an error while loading. Please reload this page.
1 parent bb50c89 commit 384a434Copy full SHA for 384a434
src/main/java/g1501_1600/s1568_minimum_number_of_days_to_disconnect_island/Solution.java
@@ -34,7 +34,6 @@ public int minDays(int[][] grid) {
34
}
35
36
37
-
38
if (numOfIslands >= 2) {
39
return 0;
40
@@ -70,7 +69,6 @@ private void tarjan(
70
69
if (nx < 0 || ny < 0 || nx >= grid.length || ny >= grid[0].length) {
71
continue;
72
73
74
if (grid[nx][ny] == 1) {
75
children++;
76
tarjan(
@@ -93,7 +91,6 @@ private void tarjan(
93
91
lows[x][y] = Math.min(lows[x][y], times[nx][ny]);
94
92
95
96
97
if (prex == -1 && children > 1) {
98
articulationPoints.add(x * grid.length + y);
99
0 commit comments