Pregunta de entrevista de Qualtrics

Problem involving recursion/backtracking