二叉搜索树(排序树,检索树)的建树,查找;
摘要:#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