Pregunta de entrevista de Two Sigma

One graph and one recursive backtracking problem