We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2451fa commit 85c91ecCopy full SHA for 85c91ec
problems/rotting-oranges/rotting_oranges.go
@@ -12,8 +12,7 @@ func orangesRotting(grid [][]int) int {
12
}
13
14
15
- for len(rottens) > 0 && freshCount > 0 {
16
- l := len(rottens)
+ for l := len(rottens); l > 0 && freshCount > 0; l = len(rottens) {
17
for _, p := range rottens {
18
for k := 0; k < 4; k++ {
19
i, j := p/c+k-2, p%c+k-1
0 commit comments