二叉树
weixin_44705665
这个作者很懒,什么都没留下…
展开
-
HDU 3791 二叉搜索树
判断两序列是否为同一二叉搜索树序列 Input 开始一个数n,(1<=n<=20) 表示有n个需要判断,n= 0 的时候输入结束。 接下去一行是一个序列,序列长度小于10,包含(0~9)的数字,没有重复数字,根据这个序列可以构造出一颗二叉搜索树。 接下去的n行有n个序列,每个序列格式跟第一个序列一样,请判断这两个序列是否能组成同一颗二叉搜索树。 Output 如果序列相同则输出YES,...原创 2019-08-08 17:22:22 · 53 阅读 · 0 评论 -
POJ 2255 二叉树
Little Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital letters in the nodes. This is an example of one of her creatio...原创 2019-08-07 09:39:49 · 93 阅读 · 0 评论 -
HDU 1710
A binary tree is a finite set of vertices that is either empty or consists of a root r and two disjoint binary trees called the left and right subtrees. There are three most important ways in which th...原创 2019-08-07 10:12:06 · 103 阅读 · 0 评论 -
HDU 5444 Elven Postman
Elves are very peculiar creatures. As we all know, they can live for a very long time and their magical prowess are not something to be taken lightly. Also, they live on trees. However, there is somet...原创 2019-08-07 11:27:40 · 54 阅读 · 0 评论