Skip to content

Commit 85c91ec

Browse files
committed
Update: Rotting Oranges
1 parent c2451fa commit 85c91ec

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

problems/rotting-oranges/rotting_oranges.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ func orangesRotting(grid [][]int) int {
1212
}
1313
}
1414
}
15-
for len(rottens) > 0 && freshCount > 0 {
16-
l := len(rottens)
15+
for l := len(rottens); l > 0 && freshCount > 0; l = len(rottens) {
1716
for _, p := range rottens {
1817
for k := 0; k < 4; k++ {
1918
i, j := p/c+k-2, p%c+k-1

0 commit comments

Comments
 (0)