Pregunta de entrevista de Google

Graph and it also involved backtracking.