Backtracking
BACKTRACKING Backtracking is an algorithmic-technique for solving problems recursively by trying to build a solution incrementally, one piece at a time, removing those solutions that fail to satisfy the constraints of the problem at any point of time (by time, here, is referred to the time elapsed till reaching any level of the search tree). Backtracking can be defined as a general algorithmic technique that considers searching every possible combination in order to solve a computational problem. There are three types of problems in backtracking – Decision Problem – In this, we search for a feasible solution. Optimization Problem – In this, we search for the best solution. Enumeration Problem – In this, we find all feasible solutions. PSEUDO CODE: 1. Recursive backtracking solution. void findSolutions(n, other params) : if (found a solution) : sol...