LiveRamp Interview Question

Leetcode question that involved BFS/DFS