2013年7月29日
摘要: DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that is BEFORE you entered the wormhole! Each of FJ's farms comprisesN(1 ≤N≤ 500) fields co 阅读全文
posted @ 2013-07-29 13:10 straw_berry 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 题目描述二叉排序树的定义是:或者是一棵空树,或者是具有下列性质的二叉树: 若它的左子树不空,则左子树上所有结点的值均小于它的根结点的值; 若它的右子树不空,则右子树上所有结点的值均大于它的根结点的值; 它的左、右子树也分别为二叉排序树。 今天我们要判断两序列是否为同一二叉排序树输入开始一个数n,(1 2 #include 3 #include 4 struct node 5 { 6 char data; 7 struct node *left,*right; 8 }; 9 int ans;10 //递归建立二叉排序树11 void build(struct node **p,c... 阅读全文
posted @ 2013-07-29 09:17 straw_berry 阅读(178) 评论(0) 推荐(0) 编辑