DIY: Rotting Oranges
Explore the Rotting Oranges problem, simulating how fresh oranges rot over time in a grid. Learn to implement efficient network traversal algorithms in Go to find the minimum minutes until all fresh oranges rot or determine if some remain fresh. This lesson helps you apply coding interview strategies to grid and network problems.
We'll cover the following...
We'll cover the following...
Problem Statement
You are given an m * n grid. Each cell in the grid contains one of the three values: [0, 1, 2]. Each value represents the following:
0represents an empty cell.1represents a fresh orange.2represents a rotten orange.
A fresh orange, represented by a 1 in the grid, will be rotten if it is ...