摘要: 1 #include<iostream> 2 #include<stdio.h> 3 #include<string.h> 4 #include<stdlib.h> 5 using namespace std; 6 7 struct Nod 8 { 9 int num;10 Nod *left;11 Nod *right;12 Nod()13 {14 num=0;15 left=right=NULL;16 }17 };18 19 template <class TYPE>20 Nod* buildBinaryS... 阅读全文
posted @ 2013-05-14 11:37 crazy_apple 阅读(270) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3791二叉搜索树Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1905Accepted Submission(s): 850Problem Description判断两序列是否为同一二叉搜索树序列Input开始一个数n,(1<=n<=20) 表示有n个需要判断,n= 0 的时候输入结束。接下去一行是一个序列,序列长度小于10,包含(0~9)的数字 阅读全文
posted @ 2013-05-14 10:47 crazy_apple 阅读(342) 评论(0) 推荐(0) 编辑