Acc to Wikipedia -
Backtracking is a general algorithm for finding all (or some) solutions to some computational problems, notably
constraint satisfaction problems, that incrementally builds candidates to the solutions, and abandons a candidate
("backtracks") as soon as it determines that the candidate cannot possibly be completed to a valid solution
Ans.When we have to get multiple solutions to a problem statement including subset problems, set problems etc. we use backtracking
Types of BackTracking Problems.
Comments