![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PAT甲级总结
天坑转码徐小虾
公众号:天坑转码小助手
展开
-
1086. Tree Traversals Again (25) [树的遍历]
1 题目 An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the keys numbered from 1 to 6) is traversed, the...原创 2019-10-12 22:38:10 · 112 阅读 · 0 评论 -
1004 Counting Leaves (30)(30 分)树的层序遍历
1.题目 A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Specification: Each input file contains one test case. Each case sta...原创 2019-10-07 19:19:59 · 110 阅读 · 0 评论 -
1020 Tree Traversals (25 分)(中序加后序建树,层序遍历)
1.题目 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 traversal sequence of th...原创 2019-10-07 21:09:13 · 163 阅读 · 0 评论 -
1043. Is It a Binary Search Tree (25) (⼆叉查找树BST)
1.题目 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 less than the node’s key. The right...原创 2019-10-08 23:47:28 · 90 阅读 · 0 评论