代码
node* create(int preL, int preR, int inL, int inR){if(preL > preR){return Null;}node* root = new node;root->data = pre[preL];for(int k = inL; k <= inR; k++){if(in[k] == pre[preL]) break;}int numLeft = k - inL;root->leftchild = create(preL + 1, preL + numLeft, inL, k - 1);root->rightchild = create(preL + numLeft + 1, preR, leftNum + 1, inR);return root;}
