Pregunta de entrevista de AND Digital

Recursion based question and backtracking traversing