Pregunta de entrevista de Google

Introduction, A graph question based on traversals