Pergunta de entrevista da empresa Ender (TX)

Coding question about graph traversal