backtracking problems tutorial