1
0
Fork 0
Browse Source

vault backup: 2022-04-18 14:37:11

master
YuJian 3 years ago
parent
commit
ac431200be
  1. 17
      数据结构与算法之美/深度优先遍历.md

17
数据结构与算法之美/深度优先遍历.md

@ -1,2 +1,17 @@ @@ -1,2 +1,17 @@
# 深度优先遍历
TODO:占个位置以后再写
TODO:占个位置以后再写
```javascript
const node = {
name: "node 1",
children: []
};
function DFS(node) {
console.log("探寻", node.name);
node.children.forEach(child => {
DFS(child);
});
console.log("回溯", node.name);
}
```
Loading…
Cancel
Save