Rotting Oranges
Given an m × n grid grid:
0represents an empty cell.1represents a fresh orange.2represents a rotten orange.
Every minute, every fresh orange adjacent (up, down, left, or right) ...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
