Build the PrimitiveMedium
Rotting Oranges
Write `oranges_rotting(grid)` where `0` is empty, `1` is fresh and `2` is rotten. Each minute, rot spreads to fresh neighbours. Return the minutes until none are fresh, or `-1` if some can never rot.
[[2,1,1],[1,1,0],[0,1,1]] -> 4
The rot spreads from every rotten orange at once, so seed the queue with *all* of them before starting — that is what makes one BFS give the right answer rather than the distance from a single source. Count fresh oranges up front so the unreachable case is a comparison, not a second scan.
What to expect: A timer starts when you begin. Edit the starter code, run it against the test suite as many times as you like, then finish when you're done. The reference solution and interviewer follow-up questions unlock only after you finish.