Domanda di colloquio di Oracle

Solve the Rotten Orange question (Graph question available on the Leetcode)