Blue Flame Labs interview question

Backtracking coding question to solve.