![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
BST
laserss
laserss@qq.com
展开
-
hdu3999 the order of a tree - BST二叉搜索树的前序遍历
hdu3999 the order of a tree 二叉搜索树(BST) 跟字典树相比,BST占用的资源少很多 所以要不要释放资源都无所谓? 还是养成一个好习惯吧,, #include using namespace std; struct BST { int num; BST *lson,*rson; BST() { num=-1; lson=rson=0原创 2012-07-27 21:25:31 · 1007 阅读 · 0 评论 -
hdu3791二叉搜索树
hdu3791二叉搜索树 又是二叉搜索树的前序遍历。 1.建树会顺序影响整棵树的形状 2.记得释放资源 3.可以用双重指针和引用优化程序。。 代码某些printf() 是之前设置的断点,,可以无视之 #include using namespace std; struct BST { char ch; BST *lson,*rson; BST() {原创 2012-07-28 10:46:16 · 843 阅读 · 0 评论