Given a grid of size M x N where each cell is 0 (empty), 1 (fresh orange), or 2 (rotten orange), find the minimum time to rot all fresh oranges. Every minute, a rotten orange rots adjacent fresh…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.