Skip to content

Commit a385b4e

Browse files
committed
style: apply clang-format to RottingOranges.java
1 parent f33695e commit a385b4e

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/main/java/com/thealgorithms/datastructures/graphs/RottingOranges.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,7 @@ public int run(int[][] grid) {
9999
int newRow = current.row + DEL_ROW[i];
100100
int newCol = current.col + DEL_COL[i];
101101

102-
if (newRow >= 0
103-
&& newRow < rows
104-
&& newCol >= 0
105-
&& newCol < cols
106-
&& copy[newRow][newCol] == 1) {
102+
if (newRow >= 0 && newRow < rows && newCol >= 0 && newCol < cols && copy[newRow][newCol] == 1) {
107103

108104
copy[newRow][newCol] = 2;
109105
rottedFresh++;
@@ -115,4 +111,4 @@ public int run(int[][] grid) {
115111

116112
return rottedFresh == freshOranges ? minutes : -1;
117113
}
118-
}
114+
}

0 commit comments

Comments
 (0)