随笔分类 -  二叉搜索树

摘要:Destroy Walls Long times ago, there are beautiful historic walls in the city. These walls divide the city into many parts of area. Since it was not co 阅读全文
posted @ 2018-11-14 23:52 suvvm 阅读(407) 评论(0) 推荐(0)
摘要:The order of a Tree 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 阅读全文
posted @ 2018-10-30 23:34 suvvm 阅读(385) 评论(0) 推荐(1)
摘要: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 阅读全文
posted @ 2018-10-30 17:30 suvvm 阅读(287) 评论(0) 推荐(1)
摘要:HDU 3791 Falling Leaves 二叉搜索树 Figure 1Figure 1 shows a graphical representation of a binary tree of letters. People familiar with binary trees can ski 阅读全文
posted @ 2018-10-29 22:57 suvvm 阅读(362) 评论(0) 推荐(1)
摘要:HDU 3791 二叉搜索树 判断两序列是否为同一二叉搜索树序列 Input开始一个数n,(1<=n<=20) 表示有n个需要判断,n= 0 的时候输入结束。 接下去一行是一个序列,序列长度小于10,包含(0~9)的数字,没有重复数字,根据这个序列可以构造出一颗二叉搜索树。 接下去的n行有n个序列, 阅读全文
posted @ 2018-10-29 21:44 suvvm 阅读(391) 评论(0) 推荐(1)