Fade to Solo
Graphs (BFS/DFS)

Rotting Oranges

NO NETMleetcode ↗

Problem

A grid has cells that are empty, contain a fresh orange, or contain a rotten orange. Every minute, any fresh orange adjacent to a rotten one becomes rotten. Return the minimum minutes until no fresh orange remains, or -1 if that's impossible.

NO NET00:00
no net — stays locked