根據先序和中序序列重建二叉樹

#include "stdafx.h" #include <iostream> #include <exception> #include <stack> using namespace std; /* 重建二叉樹 題目:輸入某二叉樹的前序遍歷和中序遍歷的結果,請重建出該二叉樹. 假設輸入的前序遍歷和中序遍歷的結果中都不含重複的數字.例如 輸入前序遍歷序列{1,2,
相關文章
相關標籤/搜索