Domanda di colloquio di Goldman Sachs

Leetcode Medium/Hard question about graphs and trees