Search⌘ K

The General Pattern

Understand the general pattern behind backtracking algorithms and how to use recursive decision-making to build solutions satisfying specific constraints. Learn to design efficient recursive algorithms by managing past decisions and trying all possibilities to solve complex problems systematically.

Characteristics of backtracking algorithms

Backtracking algorithms are commonly used to make a sequence of decisions, with the goal of building a recursively defined structure satisfying certain constraints. Often (but not always), this goal structure is itself a sequence. For example:

  • In the nn queens problem, the goal is a sequence of queen
...