This theory is part of Premium
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricingMulti-source BFS: start from every rotten cell, advance one level per minute, count what never rots.
What this asks
Find how long until every orange rots.
Multi-source BFS from every rotten cell, one minute per level; unreachable fresh cells make the answer -1.
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricing