- 博客(28)
- 资源 (1)
- 收藏
- 关注
原创 个人关于PAT的认识心得和体会
前言今天考了18年9月份的PAT甲级考试,虽然成绩不理想,但是也给一个阶段划上了句号。有一些心得和反思,写给自己,也希望能帮助他人。 正确认识PAT首先正确的认识PAT很关键:如果你是考研的同学,如果成绩优异可以替换掉浙大的计院和软院的研究生复试的机试部分(据说其他的学校也有,这一点我不太清楚,可以针对具体院校咨询一下)。如果你是工作的同学,成绩特别优异的话还是比较有...
2018-09-09 16:51:11 16332 5
原创 LeetCode 1——Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the same ...
2018-09-17 19:59:53 180
原创 Java方法参数传递问题
前言参数传递的问题从C语言开始就一直追随我们,最近本人在最准备校招面试,发现他还是如蛆附骨,如影随形。所以我们有必要和他一决高下了。参数传递在我学习C语言的时候知道了两种,一种是传值,一种是传地址(其实仔细思考都是在传递值,只不过传地址是传递指针的值)。如果想通过函数改变参数本身,就需要传地址才能修改。后来学习了C++,知道C++为了减少指针的操作,使用引用来达到相同的效果。这样就有了...
2018-09-12 20:00:58 1181
原创 PAT A 1151(甲级 2018年9月真题第四题)
1151 LCA in a Binary Tree(30 分)作者: CHEN, Yue单位: 浙江大学时间限制: 1000 ms内存限制: 64 MB代码长度限制: 16 KBThe lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U...
2018-09-10 22:28:34 1940
原创 PAT A 1018(甲级)
1018 Public Bike Management(30 分)作者: CHEN, Yue单位: 浙江大学时间限制: 400 ms内存限制: 64 MB代码长度限制: 16 KBThere is a public bike service in Hangzhou City which provides great convenience to the tourists f...
2018-09-07 20:20:10 2120
原创 PAT A 1003(甲级)
1003 Emergency(25 分)作者: CHEN, Yue单位: 浙江大学时间限制: 400 ms内存限制: 64 MB代码长度限制: 16 KBAs an emergency rescue team leader of a city, you are given a special map of your country. The map shows severa...
2018-09-07 20:03:53 401 2
原创 PAT A 1076(甲级)
1076 Forwards on Weibo(30 分)作者: CHEN, Yue单位: 浙江大学时间限制: 3000 ms内存限制: 64 MB代码长度限制: 16 KBWeibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may f...
2018-09-07 19:32:49 525 1
原创 PAT A 1013(甲级)
1013 Battle Over Cities(25 分)作者: CHEN, Yue单位: 浙江大学时间限制: 400 ms内存限制: 64 MB代码长度限制: 16 KBIt is vitally important to have all the cities connected by highways in a war. If a city is occupied b...
2018-09-07 16:49:47 519
原创 PAT A 1107(甲级)
1107 Social Clusters(30 分)作者: CHEN, Yue单位: 浙江大学时间限制: 1200 ms内存限制: 64 MB代码长度限制: 16 KBWhen register on a social network, you are always asked to specify your hobbies in order to find some po...
2018-09-07 15:13:45 406
原创 PAT A 1066(甲级)
1066 Root of AVL Tree(25 分)作者: CHEN, Yue单位: 浙江大学时间限制: 400 ms内存限制: 64 MB代码长度限制: 16 KBAn AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtree...
2018-09-07 11:24:26 313
原创 PAT A 1043(甲级)
1043 Is It a Binary Search Tree(25 分)作者: CHEN, Yue单位: 浙江大学时间限制: 400 ms内存限制: 64 MB代码长度限制: 16 KBA Binary Search Tree (BST) is recursively defined as a binary tree which has the following pro...
2018-09-07 10:35:34 604
原创 PAT A 1094(甲级)
1094 The Largest Generation(25 分)作者: CHEN, Yue单位: 浙江大学时间限制: 200 ms内存限制: 64 MB代码长度限制: 16 KBA family hierarchy is usually presented by a pedigree tree where all the nodes on the same level b...
2018-09-07 09:53:31 382
原创 PAT A 1090(甲级)
1090 Highest Price in Supply Chain(25 分)作者: CHEN, Yue单位: 浙江大学时间限制: 200 ms内存限制: 64 MB代码长度限制: 16 KBA supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- ever...
2018-09-06 21:30:40 502
原创 PAT A 1079(甲级)
1079 Total Sales of Supply Chain(25 分)作者: CHEN, Yue单位: 浙江大学时间限制: 250 ms内存限制: 64 MB代码长度限制: 16 KBA supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyo...
2018-09-06 21:17:21 435
原创 PAT A 1053(甲级)
1053 Path of Equal Weight(30 分)作者: CHEN, Yue单位: 浙江大学时间限制: 400 ms内存限制: 64 MB代码长度限制: 16 KBGiven a non-empty tree with root R, and with weight Wi assigned to each tree node Ti. The weig...
2018-09-06 21:01:46 528
原创 PAT A 1086(甲级)
1086 Tree Traversals Again(25 分)作者: CHEN, Yue单位: 浙江大学时间限制: 400 ms内存限制: 64 MB代码长度限制: 16 KBAn inorder binary tree traversal can be implemented in a non-recursive way with a stack. For exampl...
2018-09-06 19:36:27 389
原创 PAT A 1020(甲级)
1020 Tree Traversals(25 分)作者: CHEN, Yue单位: 浙江大学时间限制: 400 ms内存限制: 64 MB代码长度限制: 16 KBSuppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorde...
2018-09-06 19:11:42 618
原创 PAT A 1091(甲级)
1091 Acute Stroke(30 分)作者: CHEN, Yue单位: 浙江大学时间限制: 600 ms内存限制: 64 MB代码长度限制: 16 KBOne important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of...
2018-09-06 16:32:23 429
原创 PAT A 1103(甲级)
1103 Integer Factorization(30 分)作者: CHEN, Yue单位: 浙江大学时间限制: 1200 ms内存限制: 64 MB代码长度限制: 16 KBThe K−P factorization of a positive integer N is to write N as the sum of the P-th power of K posi...
2018-09-06 16:09:20 409
原创 PAT A 1052(甲级)
1052 Linked List Sorting(25 分)作者: CHEN, Yue单位: 浙江大学时间限制: 400 ms内存限制: 64 MB代码长度限制: 16 KBA linked list consists of a series of structures, which are not necessarily adjacent in memory. We as...
2018-09-06 14:15:23 725
原创 PAT A 1032(甲级)
1032 Sharing(25 分)作者: CHEN, Yue单位: 浙江大学时间限制: 200 ms内存限制: 64 MB代码长度限制: 16 KBTo store English words, one method is to use linked lists and store a word letter by letter. To save some space, ...
2018-09-06 13:57:22 887 3
原创 PAT A 1074 B 1025(甲级 乙级)—— 静态链表的使用
1074 Reversing Linked List(25 分)作者: CHEN, Yue单位: 浙江大学时间限制: 400 ms内存限制: 64 MB代码长度限制: 16 KBGiven a constant K and a singly linked list L, you are supposed to reverse the links of every K ele...
2018-09-06 11:09:10 562
原创 PAT A 1051(甲级)
1051 Pop Sequence(25 分)作者: CHEN, Yue单位: 浙江大学时间限制: 400 ms内存限制: 64 MB代码长度限制: 16 KBGiven a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop rando...
2018-09-05 22:04:50 626
原创 PAT A 1063(甲级)
1063 Set Similarity(25 分)作者: CHEN, Yue单位: 浙江大学时间限制: 500 ms内存限制: 64 MB代码长度限制: 16 KBGiven two sets of integers, the similarity of the sets is defined to be Nc/Nt×100%, where Nc is t...
2018-09-05 13:27:36 238
原创 PAT A 1047(甲级)
1047 Student List for Course(25 分)作者: CHEN, Yue单位: 浙江大学时间限制: 1000 ms内存限制: 64 MB代码长度限制: 16 KBZhejiang University has 40,000 students and provides 2,500 courses. Now given the registered cou...
2018-09-04 22:26:05 344
原创 PAT A 1039(甲级)
1039 Course List for Student(25 分)作者: CHEN, Yue单位: 浙江大学时间限制: 600 ms内存限制: 64 MB代码长度限制: 16 KBZhejiang University has 40000 students and provides 2500 courses. Now given the student name list...
2018-09-04 20:59:53 520
原创 PAT A 1104 B 1049 (甲级 乙级)
1104 Sum of Number Segments(20 分)作者: CAO, Peng单位: Google时间限制: 200 ms内存限制: 64 MB代码长度限制: 16 KBGiven a sequence of positive numbers, a segment is defined to be a consecutive subsequence. For ...
2018-09-03 21:16:48 237
原创 PAT A 1069 B 1019(甲级 乙级)
1069 The Black Hole of Numbers(20 分)作者: CHEN, Yue单位: 浙江大学时间限制: 200 ms内存限制: 64 MB代码长度限制: 16 KBFor any 4-digit integer except the ones with all the digits being the same, if we sort the digi...
2018-09-03 20:04:55 316
计算机网络 系统方法[Peterson/Davie]中文版pdf
2018-02-07
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人