NeetCode #567LC-994MediumGraphsNC 150NC 250
← Back to All Problems

#567 · #994 · Rotting Oranges(腐烂的橘子)

📌 Problem Statement & Constraints

You are given an m x n grid where 0 is empty, 1 is a fresh orange and 2 is a rotten orange. Each minute, fresh oranges adjacent to a rotten one become rotten. Return the minimum minutes until no fresh orange remains, or -1 if impossible. Constraints: 1 <= m, n <= 10.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!