Pergunta de entrevista da empresa IXL Learning

Some dfs & backtracking problem and analyze complexity.