重温二叉搜索树(二)

2014-11-24 07:14:41 · 作者: · 浏览: 1
f Binary Serach Tree Email:296589764@qq.com */ #include #include #include #include #include "BSTree.h" using namespace std; vector vb, vs; void visit(int a) { cout << a <<" "; } void copy(int a) { vb.push_back(a); } int main() { BSTree bst; srand(unsigned(time(NULL))); const int MAXNUM = 1000, n = 100; int a[MAXNUM], num; set s; for (int i=0; i 经过多次测试没有任何问题,虽然代码写得不够精炼。
运行结果如下: