In a grid of fresh (1) and rotten (2) oranges, each minute rotten oranges rot adjacent fresh ones. Return the minutes until none are fresh, or -1.
Practise this challenge
All coding challenges