rgb-24bit / blog

My blog by emacs org-mode
https://rgb-24bit.github.io/blog/
MIT License
4 stars 0 forks source link

blog/2018/tree-dfs #4

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

树的深度优先遍历

https://rgb-24bit.github.io/blog/2018/tree-dfs.html

szm981120 commented 1 year ago

非递归的栈深度优先,子节点的遍历需要倒序吧?(多叉树)这导致最后遍历是先左还是先右的,当然最后都是正确的DFS。