Adding code for backtracking algorithm in solvers.