摘要: 思路:由先序找到根节点,即先序的第一个元素,然后从中序中找到它的位置,以确定左右孩子,即它的左右两边的元素依次递归#include #include #include #define status int#define OK 1#define ERROR 0#define OVERFLOW -1 int k = 1;typedef struct Node{ char data; Node *left; Node *right;}*Tree;status Recover(Tree &T, char Pr[], char In[], int s, int e){ if(s... 阅读全文
posted @ 2014-02-10 17:22 心中的阿哲 阅读(716) 评论(0) 推荐(0)