C:\matthewzarate.com\literature\recursive-backtracking

Recursive Backtracking

  • N-Queens (LeetCode 51) N-Queens (LeetCode 51) in Java with recursive backtracking: place a queen row by row, check the column and both diagonals, then undo and try the next square.
  • Combination Sum (LeetCode 39) Combination Sum (LeetCode 39) in Java with recursive backtracking: reuse numbers freely, avoid duplicate combinations with a start index, then undo and try the next one.
  • Subsets (LeetCode 78) Subsets (LeetCode 78) in Java with recursive backtracking: generate every subset of an array using a start index, and how it differs from Combination Sum.
  • Word Search (LeetCode 79) Word Search (LeetCode 79) in Java with recursive backtracking on a grid: DFS letter by letter, and why un-marking visited cells is what makes it work.

4 object(s)