摘要: PAT(甲级)2019年秋季考试 7-4 Dijkstra Sequence (30 分) 题目描述: Dijkstra's algorithm is one of the very famous greedy algorithms. It is used for solving the singl 阅读全文
posted @ 2021-09-04 18:08 凌宸1642 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(33) 评论(0) 推荐(0) 编辑
摘要: PAT(甲级)2019年秋季考试 7-2 Merging Linked Lists (25 分) 题目描述: Given two singly linked lists L1=a1→a2→⋯→an−1→an and L2=b1→b2→⋯→bm−1→bm. If n≥2m, you are suppo 阅读全文
posted @ 2021-09-04 18:04 凌宸1642 阅读(130) 评论(0) 推荐(0) 编辑
摘要: PAT(甲级)2019年秋季考试 7-1 Forever (20 分) 题目描述: "Forever number" is a positive integer A with K digits, satisfying the following constrains: the sum of all 阅读全文
posted @ 2021-09-04 18:01 凌宸1642 阅读(70) 评论(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 阅读(38) 评论(0) 推荐(0) 编辑
摘要: PAT (Advanced Level) Practice 1117 Eddington Number (25 分) 凌宸1642 题目描述: British astronomer Eddington liked to ride a bike. It is said that in order to 阅读全文
posted @ 2021-08-26 00:33 凌宸1642 阅读(27) 评论(0) 推荐(0) 编辑
摘要: PAT (Advanced Level) Practice 1055 The World's Richest (25 分) 凌宸1642 题目描述: Forbes magazine publishes every year its list of billionaires based on the 阅读全文
posted @ 2021-08-23 23:07 凌宸1642 阅读(32) 评论(0) 推荐(0) 编辑
摘要: PAT (Advanced Level) Practice 1051 Pop Sequence (25 分) 凌宸1642 题目描述: Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 阅读全文
posted @ 2021-08-23 23:04 凌宸1642 阅读(18) 评论(0) 推荐(0) 编辑
摘要: PAT (Advanced Level) Practice 1049 Counting Ones (30 分) 凌宸1642 题目描述: The task is simple: given any positive integer N, you are supposed to count the t 阅读全文
posted @ 2021-08-23 23:01 凌宸1642 阅读(43) 评论(0) 推荐(0) 编辑
摘要: PAT (Advanced Level) Practice 1048 Find Coins (25 分) 凌宸1642 题目描述: Eva loves to collect coins from all over the universe, including some other planets 阅读全文
posted @ 2021-08-21 03:40 凌宸1642 阅读(22) 评论(0) 推荐(0) 编辑