Array
994. Rotting Oranges
A grid of empty (0), fresh (1), and rotten (2) oranges; each minute every rotten orange rots its 4-adjacent fresh neighbours. Find the minutes until no fresh remain, or −1 if impossible. Rot spreads…
Loading…
A grid of empty (0), fresh (1), and rotten (2) oranges; each minute every rotten orange rots its 4-adjacent fresh neighbours. Find the minutes until no fresh remain, or −1 if impossible. Rot spreads…
Loading…