Optimal Algorithmic Approach
Multi-source BFS: enqueue all initial rotten oranges at time 0 and process wave by wave.
Core Invariants & Edge Cases
- Multi-source BFS starting from all initially rotten oranges simultaneously
- Track remaining fresh oranges count
- If fresh count > 0 after BFS, return -1