Duolingo Interview Question

A backtracking question that requires coding and complexity analysis