Search
⌘K

Leetcode 994. Rotting Oranges

Given an m×n grid with empty cells, fresh (1) and rotten (2) oranges, compute the minimum minutes until all fresh oranges become rotten as rot spreads 4-directionally each minute, returning -1 if any fresh orange is unreachable. This is a multi-source BFS/level-order propagation problem starting from all initial rotten oranges.

Asked at:

OpenAI

Roblox

Amazon

Amazon


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late May, 2026

Roblox

Senior

Rotting Oranges LC.

Early May, 2026

Amazon

Amazon

Senior

Late April, 2026

OpenAI

Senior

Your account is free and you can post anonymously if you choose.