Pergunta de entrevista da empresa CareerBuilder

Algorithm question related to graph traversal.