Skip to main content
Backtracking Algorithm 回溯算法

Backtracking Algorithm 回溯算法

In a netshell 解题思路

In abraction, solving a backtracking problem is acutally iterating a decision tree. Every node of a tree has a valid answer and we traversing the tree to collect all the valid answers. 抽象地说,解决一个回溯问题,实际上就是遍历一棵决策树的过程,树的每个叶子节点存放着一个合法答案。你把整棵树遍历一遍,把叶子节点上的答案都收集起来,就能得到所有的合法答案


Yujie LiuAbout 3 minComputer ScienceAlgorithmsLeetcodeBacktracking