Skip to content

Commit

Permalink
Update backtracking.md
Browse files Browse the repository at this point in the history
  • Loading branch information
djeada authored Dec 5, 2024
1 parent 0e2a367 commit bfc7065
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion notes/backtracking.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Backtracking

Backtracking is a systematic method for solving problems that incrementally build 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. This approach is often used for constraint satisfaction problems, combinatorial optimization, and puzzles like the N-Queens problem or Sudoku.
Backtracking is a method used to solve problems by building potential solutions step by step. If it becomes clear that a partial solution cannot lead to a valid final solution, the process "backtracks" by undoing the last step and trying a different path. This approach is commonly applied to **constraint satisfaction problems**, **combinatorial optimization**, and puzzles like **N-Queens** or **Sudoku**, where all possibilities need to be explored systematically while avoiding unnecessary computations.

### Recursive Functions

Expand Down

0 comments on commit bfc7065

Please sign in to comment.