solve method completed. Backtracking with marker reduction