The general steps of solving problems with backtracking algorithm are: 1. Define a solution space, which contains the solution of the problem. 2. Organize the solution space with a method suitable for searching. 3. Search the solution space by depth-first method. 4. Use the boundary function to avoid moving to the subspace where the solution is impossible.
The solution space of the problem is usually generated dynamically in the process of searching for the solution of the problem, which is an important feature of backtracking algorithm.