← Amazon questions

Minimum iterations to rot all oranges

Filed under Amazon

Given an m x n grid where each cell is either 0 (empty), 1 (fresh orange), or 2 (rotten orange), every minute any fresh orange adjacent to a rotten one becomes rotten. Return the minimum minutes to…

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 Amazon questions

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