随笔分类 -  搜索

二叉搜索树(排序树,检索树)的建树,查找;
摘要:#include<cstdio> #include<string.h> #include<algorithm> #include<stdlib.h> #include<iostream> using namespace std; struct node { int val; node *left; node *right; node() {} node(int xx) { val=xx;left=right=NULL; } }Tree; void Build(node *tree,int x)//建树的过程就是二分查找的过程 { if 阅读全文

posted @ 2012-05-27 12:31 Hibernate4 阅读(518) 评论(0) 推荐(0)

递归是个好东西
摘要:数据结构中大部分都用到了递归,好多数据结构本身就具有递归的性质,二叉树,图论中很多的算法都用到了递归;递归V5 阅读全文

posted @ 2012-05-16 21:48 Hibernate4 阅读(139) 评论(0) 推荐(0)

导航