Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which of the following is a feature of the Backtracking algorithm ?

  • A.It always finds the optimal solution
  • B.It builds a solution incrementally and removes those solutions that are not feasible
  • C.It requires sorting to find the solution
  • D.It is used for divide-and-conquer strategies

Answer: B

Backtracking builds a solution incrementally and removes those solutions that are not feasible.

Backtracking extends a partial solution one choice at a time and, as soon as a choice cannot lead to a valid solution, undoes it and tries the next. The N-queens problem and sudoku solving are typical uses.

It finds a valid solution but not necessarily the optimal one, it needs no sorting, and divide and conquer is a different strategy that splits a problem into independent subproblems.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.