2017年8月2日

摘要: #include #include using namespace std; const int maxn=65; char name[maxn][maxn]; bool out[maxn]; int main() { int n; while(~scanf("%d",&n)) { memset(name,0,sizeof(name)); ... 阅读全文
posted @ 2017-08-02 16:57 sapphirebitter 阅读(559) 评论(0) 推荐(0)
 
摘要: #include #include void build(int n,char*s1,char*s2) { if(n<=0)return ; int p=strchr(s2,s1[0])-s2;///p表示左结点的个数 build(p,s1+1,s2);///查找左结点 build(n-p-1,s1+p+1,s2+p+1);///查找右结点 printf(... 阅读全文
posted @ 2017-08-02 15:32 sapphirebitter 阅读(119) 评论(0) 推荐(0)
 
摘要: typedef struct BiTNode { char data; struct BiTNode *lchild, *rchild; ///左右孩子 } BiTNode,*BiTree; void PreOrder_Nonrecursive1(BiTree T) ///先序遍历的非递归 { if(!T) return ; ///如果结点为空,终止 ... 阅读全文
posted @ 2017-08-02 10:58 sapphirebitter 阅读(130) 评论(0) 推荐(0)