
树
王其狗勾儿痒
这个人很懒, 什么都没有留下!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
二叉树以中序为数据, 先序或者后序为根, 创建二叉树
#include<iostream> using namespace std; struct Tree{ int v; Tree *left, *right; }; Tree *create_node(int v){ Tree *node = new Tree; node->v = v; node->left = node->right = NUL...原创 2018-08-20 16:12:01 · 136 阅读 · 0 评论 -
UVA548
题意:根据中序 和 后序, 求每个叶子节点 到 根节点的最小距离 // 建立树上比较麻烦 , 但只要知道那两个递归就容易了。 // 递归的参数有注解 #include<iostream> #include<string> #include<sstream> #include<algorithm> using namespace std; c...原创 2018-08-20 20:07:41 · 213 阅读 · 0 评论