![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树
就是乐
Dont't try to rush things that need time to grow.
展开
-
HDU 3999----The order of a Tree(二叉树的前序遍历)
二叉树的建立,在主函数里都是返回的是根节点 Problem Description As we know,the shape of a binary search tree is greatly related to the order of keys we insert. To be precisely: 1. insert a key k to a empty tree,原创 2015-10-19 19:06:07 · 775 阅读 · 0 评论 -
二叉树建树
利用带空的先序遍历结果建立二叉树: tree *creat(tree *root) { char ch; scanf("%c",&ch); if(ch==',') root=NULL; else { root=new tree; root->data=ch; root->left=cre原创 2015-12-31 16:29:57 · 2740 阅读 · 0 评论