树
文章平均质量分 79
就是乐
Dont't try to rush things that need time to grow.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU 3999----The order of a Tree(二叉树的前序遍历)
二叉树的建立,在主函数里都是返回的是根节点Problem DescriptionAs 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 · 861 阅读 · 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 · 2805 阅读 · 0 评论
分享