[理工] 102台大電機丙資結

作者: qaswed101 (一一)   2018-01-22 16:23:04
https://i.imgur.com/7PPnfhk.jpg
這題之前的文章有說要用一個binary tree當反例
想請問怎麼traverse
因為我還是不太明白
謝謝
作者: ShenJing (ShenJing)   2018-01-22 17:14:00
不知道這樣可不可以 https://imgur.com/CyxJxt0
作者: b10007034 (Warren)   2018-01-22 20:57:00
同上,postorder traversal就是dfs了。順帶一提這題其實就是topological sort關鍵字:DAG,DFS

Links booklink

Contact Us: admin [ a t ] ucptt.com