time limit: 1000ms memory limit: 65536k 有疑問?點這裡^_^
輸入二叉樹的先序遍歷序列和中序遍歷序列,輸出該二叉樹的後序遍歷序列。
第一行輸入二叉樹的先序遍歷序列;
第二行輸入二叉樹的中序遍歷序列。
輸出該二叉樹的後序遍歷序列。
abdcefbdaecf
dbefca
#include#include#includestruct node
; struct node *creat(int n,char *a,char *b)
void houxu(struct node *root)
} int main()
資料結構上機 二叉樹
include include include using namespace std typedef char telemtype typedef struct binarytreenode node typedef node bintree 建立二叉樹,中間節點 左子樹 右子樹 node cre...
資料結構上機測試4 1 二叉樹的遍歷與應用1
資料結構上機測試4.1 二叉樹的遍歷與應用1 time limit 1000ms memory limit 65536kb submit statistic problem description 輸入二叉樹的先序遍歷序列和中序遍歷序列,輸出該二叉樹的後序遍歷序列。input 第一行輸入二叉樹的先序...
資料結構上機測試4 1 二叉樹的遍歷與應用1
time limit 1000ms memory limit 65536kb problem description 輸入二叉樹的先序遍歷序列和中序遍歷序列,輸出該二叉樹的後序遍歷序列。input 第一行輸入二叉樹的先序遍歷序列 第二行輸入二叉樹的中序遍歷序列。output 輸出該二叉樹的後序遍歷序...