![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
二叉树
文章平均质量分 81
心悦灵溪
这个作者很懒,什么都没留下…
展开
-
PAT练习题 P1119 Pre- and Post-order Traversals (30分)【二叉树遍历】
传送门:P1119 Pre- and Post-order Traversals (30分) Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and in...原创 2020-03-02 12:46:16 · 529 阅读 · 0 评论 -
PAT练习题 P1020 Tree Traversals (25分)【树的遍历】
传送门:P1020 P1020 Tree Traversals (25分) Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the...原创 2020-02-28 01:17:57 · 245 阅读 · 0 评论 -
堆排序算法个人理解
一、基础知识 堆的结构可以分为大根堆和小根堆,是一个完全二叉树,而堆排序是根据堆的这种数据结构设计的一种排序。 完全二叉树(Complete Binary Tree): 除了最后一层之外的其他每一层都被完全填充,并且所有结点都保持向左对齐。 1.1 大根堆和小根堆 大根堆:每个结点的值都大于其左孩子和右孩子结点的值。 小根堆:每个结点的值都小于其左孩子和右孩子结点的值。 2.2 查找数...原创 2019-11-18 21:03:35 · 202 阅读 · 0 评论 -
HDU 1710 Binary Tree Traversals 【二叉树的遍历】
传送门:HDU 1710 Binary Tree Traversals Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description A binary tree is a finite set of vertices that is either...原创 2019-07-29 20:52:59 · 202 阅读 · 0 评论 -
HDU 3791 二叉搜索树
传送门:HDU 3791 二叉搜索树 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 判断两序列是否为同一二叉搜索树序列 Input 开始一个数n,(1<=n<=20) 表示有n个需要判断,n= 0 的时候输入结束。 接...原创 2019-07-29 21:36:29 · 402 阅读 · 0 评论