Given an N x N grid representing a garden, where 0 is an empty cell, 1 is a fresh tomato, and 2 is a rotten tomato. Every minute, any fresh tomato 4-directionally adjacent to a rotten tomato rots…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.