Pregunta de entrevista de CareerBuilder

Algorithm question related to graph traversal.