Math, asked by shashanktelang889, 1 year ago

What is backtracking algorithm with example?

Answers

Answered by asim12
0
Backtracking is a generalalgorithm for finding all (or some) solutions to some computational problems, notably constraint satisfaction problems, that incrementally builds candidates to the solutions, and abandons each partial candidate ("backtracks") as soon as it determines that the candidate cannot possibly
Examples
Puzzles such as eight queens puzzle, crosswords, verbal arithmetic, Sudoku, and Peg Solitaire. Combinatorial optimization problems such as parsing and the knapsack problem. Logic programming languages such as Icon, Planner and Prolog, which use backtracking internally to generate answers.
Similar questions