摘要:
总时间限制: 1000ms内存限制: 65536kB描述An army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a wal... 阅读全文
摘要:
Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", ... 阅读全文
摘要:
11-散列1 电话聊天狂人(25 分)给定大量手机用户通话记录,找出其中通话次数最多的聊天狂人。输入格式:输入首先给出正整数N(≤105),为通话记录条数。随后N行,每行给出一条通话记录。简单起见,这里只列出拨出方和接收方的11位数字构成的手机号码,其中以空格分... 阅读全文
摘要:
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of th... 阅读全文
摘要:
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 inpu... 阅读全文
摘要:
10-排序6 Sort with Swap(0, i)(25 分)Given any permutation of the numbers {0, 1, 2,..., N−1}, it is easy to sort them in increasing order.... 阅读全文
摘要:
10-排序5 PAT Judge(25 分)The ranklist of PAT is generated from the status list, which shows the scores of the submissions. This time you ... 阅读全文
摘要:
10-排序4 统计工龄(20 分)给定公司N名员工的工龄,要求按工龄增序输出每个工龄段有多少员工。输入格式:输入首先给出正整数N(≤105),即员工总人数;随后给出N个整数,即每个员工的工龄,范围在[0, 50]。输出格式:按工龄的递增顺序输出每个工龄的员工个数... 阅读全文
摘要:
09-排序3 Insertion or Heap Sort(25 分)According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and gr... 阅读全文
摘要:
09-排序2 Insert or Merge(25 分)According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a... 阅读全文