PAT
BlackCarDriver
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Cars on Campus(30)
Cars on Campus (30)https://www.nowcoder.com/pat/5/problem/4319题目大意:给你一n个无序的停车场汽车进出情况日志,包括汽车车牌,记录时间和事件(in 或out),n最大为10000.然后询问m次,每次给出一个事件点,要求输出该时刻停车场有多少辆车。最后输出在停车场停留最长的车和停留的时间。分析:1.一个场景,两个问题,用到的数据...原创 2019-03-26 19:12:17 · 807 阅读 · 0 评论 -
Are They Equal (25)
Are They Equal (25)难度: ⭐⭐⭐题目连接题目描述If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0.123*105 with simple chopp...原创 2019-07-18 09:32:00 · 536 阅读 · 1 评论 -
Dating (20)
Dating (20)**难度:**⭐⭐题目描述Sherlock Holmes received a note with some strange strings: "Let’sdate! 3485djDkxh4hhGE 2984akDfkkkkggEdsbs&hgsfdk d&Hyscvnm". It took him only a minute to figureo...原创 2019-07-11 09:44:44 · 381 阅读 · 0 评论 -
Graduate Admission (30)
Graduate Admission (30)难度 : ⭐⭐⭐题目描述It is said that in 2013, there were about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if you could w...原创 2019-07-13 22:24:16 · 538 阅读 · 0 评论 -
Stack (30)
Stack (30)难度: ⭐⭐⭐⭐题目描述Stack is one of the most fundamental data structures, which is based on the principle of Last In First Out (LIFO). The basic operations include Push (inserting an element ont...原创 2019-07-12 23:12:03 · 534 阅读 · 0 评论 -
Talent and Virtue (25)
Talent and Virtue (25)题目连接:https://www.nowcoder.com/pat/5/problem/4029难度:⭐题目描述About 900 years ago, a Chinese philosopher Sima Guang wrote a historybook in which he talked about people’s talentan...原创 2019-04-24 21:58:56 · 481 阅读 · 0 评论 -
Pop Sequence (25)
Pop Sequence (25)难度:⭐⭐题目描述Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, …, N and pop randomly. You are supposed to tell if a given sequence of numbers is...原创 2019-04-17 20:59:20 · 336 阅读 · 0 评论 -
Shopping in Mars (25)
Shopping in Mars (25) 难度:⭐⭐题目连接题目描述Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M$). When making the pay...原创 2019-04-16 23:49:54 · 303 阅读 · 0 评论 -
Is It a Binary Search Tree (25)
Is It a Binary Search Tree (25) 难度:中等题目连接问题描叙A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only node...原创 2019-04-12 21:33:22 · 317 阅读 · 0 评论 -
Count PAT's (25)
题目描述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, and the 6th characters....原创 2019-04-09 12:25:40 · 345 阅读 · 0 评论 -
Find Coins (25)
链接:https://www.nowcoder.com/pat/5/problem/4087题目:Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which co...原创 2019-04-09 10:06:06 · 412 阅读 · 0 评论 -
Speech Patterns (25)
链接:https://www.nowcoder.com/pat/5/problem/4120Speech Patterns (25)People often have a preference among synonyms of the same word. For example, some may prefer “the police”, while others may prefer “...原创 2019-04-08 23:26:55 · 272 阅读 · 0 评论 -
Deduplication on a Linked List (25)
题目连接:Deduplication on a Linked List (25)题目描述Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each value...原创 2019-04-02 18:27:09 · 331 阅读 · 0 评论 -
Find More Coins (30)
Find More Coins (30)题目连接大意:给你m个额度不同的硬币(m最大为10000,相同额度的硬币可重复),给出一个面额n。要求从这m个硬币中找出最佳组合使得组合中的硬币面额加起来等于n。最佳指字典序最小。思路:首先对输入的硬币进行排序,然后使用递归方式(dfs)求解,注意题目说道n<=10^2,且硬币都是整数,在前一百个硬币以内必能判断是否能找到组合。因为硬币已经小到...原创 2019-03-28 14:01:11 · 440 阅读 · 0 评论 -
Be Unique (20)
题目连接难度:水题题目描述Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1, 104]. The fir...原创 2019-04-11 08:39:13 · 229 阅读 · 0 评论 -
Sort with Swap(0,*) (25)
题目连接题目描述Given any permutation of the numbers {0, 1, 2,…, N-1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operation that is allowed to use? For example, to sor...原创 2019-04-10 23:58:50 · 330 阅读 · 0 评论 -
Longest Symmetric String (25)
Longest Symmetric String (25)题目描述Given a string, you are supposed to output the length of the longestsymmetric sub-string. For example, given “Is PAT&TAPsymmetric?”, the longest symmetric sub-...原创 2019-04-10 11:05:12 · 276 阅读 · 0 评论 -
Hashing (25)
Hashing (25)难度 : ⭐⭐⭐题目链接题目描述The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the input numbers. The hash function...原创 2019-07-16 23:15:49 · 487 阅读 · 0 评论
分享