![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树
文章平均质量分 73
追什么风筝
这个作者很懒,什么都没留下…
展开
-
zcmu1507
1507: 二叉树的先序建树和后序输出Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 124 Solved: 75[Submit][Status][Web Board]Description 二叉树的先序建树和后序输出Input 输入一行只包含大写字母的字符串,字符串长度小于100,#表示空节点,请按照原创 2017-08-22 00:29:01 · 394 阅读 · 0 评论 -
1099 Build A Binary Search Tree (30 分)
1099 Build A Binary Search Tree (30 分)A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys...原创 2018-12-05 23:36:24 · 187 阅读 · 0 评论 -
1110 Complete Binary Tree (25 分)
Given a tree, you are supposed to tell if it is a complete binary tree.Input Specification:Each input file contains one test case. For each case, the first line gives a positive integer N (≤20) wh...原创 2018-12-05 23:28:03 · 369 阅读 · 0 评论 -
1064 Complete Binary Search Tree (30 分)(完全二叉搜索树)
1064 Complete Binary Search Tree (30 分)A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with key...原创 2018-12-05 23:22:22 · 191 阅读 · 0 评论 -
1043 Is It a Binary Search Tree (25 分)(判断是不是二叉搜索树)
1043 Is It a Binary Search Tree (25 分)A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys...原创 2018-12-05 23:14:51 · 293 阅读 · 0 评论 -
PAT甲级1119 Pre- and Post-order Traversals (30 分)
1119 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 inorder t...原创 2018-12-05 21:23:11 · 186 阅读 · 0 评论 -
PAT甲级1120Tree Traversals(后序中序建树)
1020 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 level order ...原创 2018-12-05 21:16:11 · 135 阅读 · 0 评论 -
1066 Root of AVL Tree (25 分)
1066 Root of AVL Tree (25 分)An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by...原创 2018-12-07 16:38:05 · 170 阅读 · 0 评论 -
FZU2256迷宫
某一天,YellowStar在人生的道路上迷失了方向,迷迷糊糊之中,它误入了一座迷宫中,幸运的是它在路口处发现了一张迷宫的地图。经过它的观察,它发现这个迷宫一共有n个房间,并且这n个房间呈现一个有根树结构,它现在所在的1号房间为根,其它每个房间都有一个上级房间,连接第i个房间和它的上级房间Pi的道路长度为Wi。在地图的背面,记载了这个迷宫中,每个房间拥有一个时空传送门,第i个房间的传送门可原创 2017-08-22 00:32:46 · 243 阅读 · 0 评论 -
1123 Is It a Complete AVL Tree (30 分)
1123 Is It a Complete AVL Tree (30 分)An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they ...原创 2018-12-06 00:06:46 · 94 阅读 · 0 评论