Pregunta de entrevista de Applied Intuition

Leetcode hard (graph traversal question)