Pregunta de entrevista de AngelList

Basic leetcode DFS question based on real use case