Simulate the spread of rot through a grid and return the minutes until all oranges rot, or -1 if impossible.
Constraints
Example
```python print(oranges_rotting([[2,1,1],[1,1,0],[0,1,1]])) # 4 print(oranges_rotting([[2,1,1],[0,1,1],[1,0,1]])) # -1 print(oranges_rotting([[0,2]])) # 0 print(oranges_rotting([[1,1,1],[1,0,1],[1,1,1]])) # -1 ```
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints