← Accolite questions

Rotten Apples / Oranges problem

Filed under Accolite

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.

Related Accolite questions

Collected from public candidate posts and coding forums. Updated Nov 2026.