Question d’entretien chez Goldman Sachs

Leetcode Medium/Hard question about graphs and trees