You are given an m x n grid where 0 is an empty cell, 1 is a fresh apple, and 2 is a rotten apple. Every minute, any fresh apple that is 4-directionally adjacent to a rotten apple becomes rotten…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.