You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
深度优先遍历
TODO:占个位置以后再写
const node = {
name: "node 1",
children: []
};
function DFS(node) {
console.log("探寻", node.name);
node.children.forEach(child => {
DFS(child);
});
console.log("回溯", node.name);
}