Given an M x N grid where each cell is either 0 (empty) or 1 (infected), every minute, any 0 adjacent to a 1 becomes infected. Return the minimum time until all cells are infected, or -1 if…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.