二叉樹遍歷輸出

按先序遍歷序列創建一個二叉樹的二叉鏈表,並按先序遍歷、中序遍歷、後序遍歷將其輸出。 測試用例1node -+a##*b##c##/d##e##↵ 期待輸出1ios 前序遍歷結果:- + a * b c / d e ↵ 中序遍歷結果:a + b * c - d / e ↵ 後序遍歷結果:a b c * + d e / - ↵ #include <iostream> #include <list> #
相關文章
相關標籤/搜索