Skip to content

Commit cf3e8f0

Browse files
committed
bug fix
1 parent 1599c65 commit cf3e8f0

File tree

2 files changed

+30
-31
lines changed

2 files changed

+30
-31
lines changed

.idea/workspace.xml

Lines changed: 29 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/com/github/chen0040/leetcode/day20/medium/PacificAtlanticWaterFlow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ else if(rowCount == 1) {
7575
int col = v % colCount;
7676
if(can_reach_pacific[v]) reach_pacific = true;
7777
if(can_reach_atlantic[v]) reach_atlantic = true;
78-
if(!(reach_pacific && reach_atlantic) || row == 0 || col == 0 || row == rowCount-1 || col == colCount - 1) {
78+
if(!(reach_pacific && reach_atlantic) && (row == 0 || col == 0 || row == rowCount-1 || col == colCount - 1)) {
7979
if(types[v] == 1) reach_pacific = true;
8080
else if(types[v] == 2) reach_atlantic = true;
8181
else if(types[v] == 3) {

0 commit comments

Comments
 (0)