Q.Which of the following is not a backtracking algorithm?
Correct answer: Towers of Hanoi
Explanation
The Tower of Hanoi is not a backtracking algorithm, but rather a recursion problem. Backtracking algorithms incrementally build a solution and abandon a path if it won't lead to a solution. The Tower of Hanoi however is a classic problem that's typically using recursive algorithms.
The Tower of Hanoi is not a backtracking algorithm, but rather a recursion problem. Backtracking algorithms incrementally build a solution and abandon a path if it won't lead to a solution. The Tower of Hanoi however is a classic problem that's typically using recursive algorithms.