Pergunta de entrevista da empresa Walmart

Given a bidirectional graph, traverse all the nodes starting at any node. This one was easy.