The General Pattern
Explore the foundational pattern of backtracking algorithms by understanding how they recursively build solutions through sequential decisions. Learn to design effective recursive backtracking algorithms by determining necessary information about past decisions and applying brute force search strategies. This lesson will deepen your problem-solving skills with backtracking in Python.
We'll cover the following...
We'll cover the following...
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 Queens problem, the goal is a sequence of queen