Domanda di colloquio di LiveRamp

Leetcode question that involved BFS/DFS