随笔分类 -  PTA甲级

摘要:题目: In the big cities, the subway systems always look so complex to the visitors. To give you some sense, the following figure shows the map of Beijin 阅读全文
posted @ 2023-09-14 20:58 Yohoc 阅读(13) 评论(0) 推荐(0) 编辑
摘要:题目: Cutting an integer means to cut a K digits lone integer Z into two integers of (K/2) digits long integers A and B. For example, after cutting Z = 阅读全文
posted @ 2023-09-14 16:36 Yohoc 阅读(15) 评论(0) 推荐(0) 编辑
摘要:题目: There is a kind of balanced binary search tree named red-black tree in the data structure. It has the following 5 properties: (1) Every node is ei 阅读全文
posted @ 2023-09-13 15:37 Yohoc 阅读(21) 评论(0) 推荐(0) 编辑
摘要:题目: Consider a positive integer N written in standard notation with k+1 digits ai​ as ak​⋯a1​a0​ with 0≤ai​<10 for all i and ak​>0. Then N is palindro 阅读全文
posted @ 2023-09-12 16:32 Yohoc 阅读(5) 评论(0) 推荐(0) 编辑
摘要:题目: For a student taking the online course "Data Structures" on China University MOOC (http://www.icourse163.org/), to be qualified for a certificate, 阅读全文
posted @ 2023-09-12 12:18 Yohoc 阅读(21) 评论(0) 推荐(0) 编辑
摘要:题目: Suppose that all the keys in a binary tree are distinct positive integers. Given the preorder and inorder traversal sequences, you are supposed to 阅读全文
posted @ 2023-09-12 10:58 Yohoc 阅读(9) 评论(0) 推荐(0) 编辑
摘要:题目: After each PAT, the PAT Center will announce the ranking of institutions based on their students' performances. Now you are asked to generate the 阅读全文
posted @ 2023-09-04 17:45 Yohoc 阅读(38) 评论(0) 推荐(0) 编辑
摘要:题目: A clique is a subset of vertices of an undirected graph such that every two distinct vertices in the clique are adjacent. A maximal clique is a cl 阅读全文
posted @ 2023-09-04 15:28 Yohoc 阅读(17) 评论(0) 推荐(0) 编辑
摘要:题目: The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants. A binary search tree (BS 阅读全文
posted @ 2023-09-03 22:29 Yohoc 阅读(24) 评论(0) 推荐(0) 编辑
摘要:题目: In July 2004, Google posted on a giant billboard along Highway 101 in Silicon Valley (shown in the picture below) for recruitment. The content is 阅读全文
posted @ 2023-08-26 11:04 Yohoc 阅读(7) 评论(0) 推荐(0) 编辑
摘要:题目 A proper vertex coloring is a labeling of the graph's vertices with colors such that no two vertices sharing the same edge have the same color. A c 阅读全文
posted @ 2023-08-25 22:43 Yohoc 阅读(9) 评论(0) 推荐(0) 编辑
摘要:In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the 阅读全文
posted @ 2023-08-24 21:06 Yohoc 阅读(7) 评论(0) 推荐(0) 编辑
摘要:题目: Given a sequence of positive integers and another positive integer p. The sequence is said to be a perfect sequence if M≤m×p where M and m are the 阅读全文
posted @ 2023-06-08 09:42 Yohoc 阅读(23) 评论(0) 推荐(0) 编辑
摘要:题目: There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at a 阅读全文
posted @ 2023-06-06 16:02 Yohoc 阅读(25) 评论(0) 推荐(0) 编辑
摘要:题目: As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by som 阅读全文
posted @ 2023-06-03 10:08 Yohoc 阅读(7) 评论(0) 推荐(0) 编辑
摘要:题目: This is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topological order obtained from the given directed 阅读全文
posted @ 2023-05-31 16:42 Yohoc 阅读(7) 评论(0) 推荐(0) 编辑
摘要:题目: Some scientists took pictures of thousands of birds in a forest. Assume that all the birds appear in the same picture belong to the same tree. You 阅读全文
posted @ 2023-05-31 14:44 Yohoc 阅读(19) 评论(0) 推荐(0) 编辑
摘要:题目: When register on a social network, you are always asked to specify your hobbies in order to find some potential friends with the same hobbies. A s 阅读全文
posted @ 2023-05-31 11:08 Yohoc 阅读(10) 评论(0) 推荐(0) 编辑
摘要:题目: The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants. Given any two nodes in a 阅读全文
posted @ 2023-05-28 09:58 Yohoc 阅读(9) 评论(0) 推荐(0) 编辑
摘要:题目: 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 阅读全文
posted @ 2023-05-25 09:12 Yohoc 阅读(5) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示