- 博客(9)
- 收藏
- 关注
原创 PAT 甲级 1119 Pre- and Post-order Traversals (30 分)
PAT 甲级 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 ...
2019-09-07 08:59:39 260 3
原创 PAT 甲级 1093 Count PAT's(25分)
PAT 甲级 1093 Count PAT’s题目The string APPAPT contains two PAT's as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the second one is formed by the 3rd, the 4th, an...
2019-08-06 10:04:25 177
原创 PAT 甲级 1092 To Buy or Not to Buy
PAT 甲级 1092 To Buy or Not to Buy题目Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. However ...
2019-08-06 09:20:43 174
原创 PAT 甲级 1066 平衡二叉树的创建
PAT 甲级 1066 Root of AVL Tree (25 分)平衡二叉树的创建题目这题主要考查了平衡二叉树的创建。除此之外还得一直保留二叉树的根节点。由于此前对于平衡二叉树的创建比较模糊,故结合了严姥姥的教材写一篇博客加深一下自己对于平衡二叉树的创建的印象。平衡二叉树概念平衡二叉树是一种二叉排序树,将其不断调整为平衡二叉树是为了提高查找的效率。平衡二叉树的递归定义条件是:对于...
2019-07-30 14:11:32 209
原创 PAT 甲级 1049(30 分)
PAT 甲级 1049(30 分)题目The task is simple: given any positive integer N, you are supposed to count the total number of 1’s in the decimal form of the integers from 1 to N. For example, given N being 12,...
2019-07-26 11:29:33 340
原创 PAT 甲级 1033 Fill or Not to Fill (25分)
PAT 甲级 1033 Fill or Not to Fill (25分)题目With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas stations ...
2019-07-22 12:36:57 156
原创 PAT 甲级1026 Table Tennis (30 分)
PAT 甲级1026 Table Tennis (30 分)题目A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some tables open when they arri...
2019-07-19 14:38:07 375
原创 PAT 甲级 1018 Public Bike Management
PAT 甲级 1018 Public Bike Management题目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 any station and ...
2019-07-16 14:04:37 138
原创 PAT 甲级1014 Waiting in Line
PAT 甲级1014 Waiting in Line题目描述(中文大意):假设银行有N个窗口开放服务。在所有窗口前有一条黄线将等待区域分成俩部分。客户排队的规则是:黄线以内的区域每个窗口前都足够容纳M个客户。因此当所有N个队都排满了之后,其他客户,也就是在第(NM+1)个用户(包括该用户)之后的所有用户都必须等待在黄线区之外。每个在黄线外的客户都会选择一个最短的队列去排队,如果当前有俩个...
2019-07-11 17:05:33 169
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人