首页 > TAG信息列表 > Rotting

[LeetCode] 994. Rotting Oranges 腐烂的橘子

You are given an m x n grid where each cell can have one of three values: 0 representing an empty cell, 1 representing a fresh orange, or 2 representing a rotten orange. Every minute, any fresh orange that is 4-directionally adjacent to a rotten or

994. Rotting Oranges

package LeetCode_994 import java.util.* /** * 994. Rotting Oranges * https://leetcode.com/problems/rotting-oranges/ * * In a given grid, each cell can have one of three values: the value 0 representing an empty cell; the value 1 representing a fresh

994. Rotting Oranges - Medium

In a given grid, each cell can have one of three values: the value 0 representing an empty cell; the value 1 representing a fresh orange; the value 2 representing a rotten orange. Every minute, any fresh orange that is adjacent (4-directionally) to a

994. Rotting Oranges

In a given grid, each cell can have one of three values: the value 0 representing an empty cell; the value 1 representing a fresh orange; the value 2 representing a rotten orange. Every minute, any fresh orange that is adjacent (4-directionally) to a