poj 2255
摘要:
题意:给出一棵二叉树的前序遍历和中序遍历,输出这棵树的后序遍历。代码:#include<iostream>#include<fstream>using namespace std;int n;char c1[30],c2[30];struct e{ char c; e *left,*right;};e * solve(int p,int q,int s){ int i; e *f=new e; for(i=q;i<=s;i++) if(c2[i]==c1[p]) break; f->c=c1[p]; if(i==q) f->left=NULL; els 阅读全文
posted @ 2011-05-14 17:33 宇宙吾心 阅读(559) 评论(0) 推荐(0)
浙公网安备 33010602011771号