随笔分类 -  二叉树

BST
摘要:PAT(甲级)2019年秋季考试 7-3 Postfix Expression (25 分) 题目描述: Given a syntax tree (binary), you are supposed to output the corresponding postfix expression, wi 阅读全文
posted @ 2021-09-04 18:06 凌宸1642 阅读(68) 评论(0) 推荐(0)
摘要:PAT (Advanced Level) Practice 1119 Pre- and Post-order Traversals (30 分) 凌宸1642 题目描述: Suppose that all the keys in a binary tree are distinct positive 阅读全文
posted @ 2021-08-26 00:35 凌宸1642 阅读(67) 评论(0) 推荐(0)
摘要:PAT (Advanced Level) Practice 1151 LCA in a Binary Tree (30 分) 凌宸1642 题目描述: The lowest common ancestor (LCA) of two nodes U and V in a tree is the dee 阅读全文
posted @ 2021-08-20 01:59 凌宸1642 阅读(73) 评论(0) 推荐(0)
摘要:PAT (Advanced Level) Practice 1143 Lowest Common Ancestor (30 分) 凌宸1642 题目描述: The lowest common ancestor (LCA) of two nodes U and V in a tree is the d 阅读全文
posted @ 2021-08-19 00:47 凌宸1642 阅读(55) 评论(0) 推荐(0)
摘要:PAT (Advanced Level) Practice 1138 Postorder Traversal (25 分) 凌宸1642 题目描述: Suppose that all the keys in a binary tree are distinct positive integers. 阅读全文
posted @ 2021-08-17 00:25 凌宸1642 阅读(44) 评论(0) 推荐(0)
摘要:PAT (Advanced Level) Practice 1130 Infix Expression (25 分) 凌宸1642 题目描述: Given a syntax tree (binary), you are supposed to output the corresponding inf 阅读全文
posted @ 2021-08-16 13:46 凌宸1642 阅读(53) 评论(0) 推荐(0)
摘要:PAT (Advanced Level) Practice 1127 ZigZagging on a Tree (30 分) 凌宸1642 题目描述: Suppose that all the keys in a binary tree are distinct positive integers. 阅读全文
posted @ 2021-08-15 14:00 凌宸1642 阅读(56) 评论(0) 推荐(0)
摘要:PAT (Advanced Level) Practice 1115 Counting Nodes in a BST (30 分) 凌宸1642 题目描述: A Binary Search Tree (BST) is recursively defined as a binary tree whic 阅读全文
posted @ 2021-08-13 20:28 凌宸1642 阅读(44) 评论(0) 推荐(0)
摘要:PAT (Advanced Level) Practice 1106 Lowest Price in Supply Chain (25 分) 凌宸1642 题目描述: A supply chain is a network of retailers(零售商), distributors(经销商), 阅读全文
posted @ 2021-08-12 23:52 凌宸1642 阅读(49) 评论(0) 推荐(0)
摘要:PAT (Advanced Level) Practice 1086 Tree Traversals Again (25 分) 凌宸1642 题目描述: An inorder binary tree traversal can be implemented in a non-recursive wa 阅读全文
posted @ 2021-08-10 19:21 凌宸1642 阅读(60) 评论(0) 推荐(0)
摘要:PAT (Advanced Level) Practice 1102 Invert a Binary Tree (25 分) 凌宸1642 题目描述: The following is from Max Howell @twitter: Google: 90% of our engineers us 阅读全文
posted @ 2021-08-08 01:17 凌宸1642 阅读(44) 评论(0) 推荐(0)
摘要:PAT (Advanced Level) Practice 1090 Highest Price in Supply Chain (25 分) 凌宸1642 题目描述: A supply chain is a network of retailers(零售商), distributors(经销商), 阅读全文
posted @ 2021-08-07 22:52 凌宸1642 阅读(44) 评论(0) 推荐(0)
摘要:PAT (Advanced Level) Practice 1099 Build A Binary Search Tree (30 分) 凌宸1642 题目描述: A Binary Search Tree (BST) is recursively defined as a binary tree w 阅读全文
posted @ 2021-08-06 19:11 凌宸1642 阅读(41) 评论(0) 推荐(0)
摘要:PAT (Advanced Level) Practice 1094 The Largest Generation (25 分) 凌宸1642 题目描述: A family hierarchy is usually presented by a pedigree tree where all the 阅读全文
posted @ 2021-08-06 19:08 凌宸1642 阅读(37) 评论(0) 推荐(0)
摘要:PAT (Advanced Level) Practice 1043 Is It a Binary Search Tree (25 分) 凌宸1642 题目描述: A Binary Search Tree (BST) is recursively defined as a binary tree w 阅读全文
posted @ 2021-04-08 22:28 凌宸1642 阅读(58) 评论(0) 推荐(0)