10 2017 档案

摘要:693是一道很简单的题目。 阅读全文
posted @ 2017-10-26 19:06 章鱼小年糕 阅读(116) 评论(0) 推荐(0) 编辑
摘要:Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a g 阅读全文
posted @ 2017-10-25 22:49 章鱼小年糕 阅读(102) 评论(0) 推荐(0) 编辑
摘要:#include #include #define MAX 10 typedef struct process { char name[10]; int priority; int ReachTime; int NeedTime; int UsedTime; char state; }PCB; int n=0; int pTime; PCB sta... 阅读全文
posted @ 2017-10-25 22:26 章鱼小年糕 阅读(917) 评论(0) 推荐(0) 编辑
摘要:You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins. Given n, find the total number 阅读全文
posted @ 2017-10-24 19:40 章鱼小年糕 阅读(113) 评论(0) 推荐(0) 编辑
摘要:Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 阅读全文
posted @ 2017-10-24 19:07 章鱼小年糕 阅读(118) 评论(0) 推荐(0) 编辑
摘要:Given an integer, return its base 7 string representation. Example 1: Input: 100 Output: "202" Example 2: Input: -7 Output: "-10" Note: The input will 阅读全文
posted @ 2017-10-23 22:59 章鱼小年糕 阅读(145) 评论(0) 推荐(0) 编辑
摘要:Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of 阅读全文
posted @ 2017-10-22 21:26 章鱼小年糕 阅读(140) 评论(0) 推荐(0) 编辑
摘要:The count-and-say sequence is the sequence of integers with the first five terms as following: 1. 1 2. 11 3. 21 4. 1211 5. 111221 1 is read off as "on 阅读全文
posted @ 2017-10-21 22:44 章鱼小年糕 阅读(126) 评论(0) 推荐(0) 编辑
摘要:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the 阅读全文
posted @ 2017-10-20 16:26 章鱼小年糕 阅读(78) 评论(0) 推荐(0) 编辑
摘要:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. var merg 阅读全文
posted @ 2017-10-20 16:14 章鱼小年糕 阅读(103) 评论(0) 推荐(0) 编辑
摘要:Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, you 阅读全文
posted @ 2017-10-19 16:57 章鱼小年糕 阅读(97) 评论(0) 推荐(0) 编辑
摘要:今天真是郁闷啊( ̄﹏ ̄;),写了好几个题目都未果(难道是因为中午一直在上课吗?) Given a sorted array, remove the duplicates in place such that each element appear only once and return the n 阅读全文
posted @ 2017-10-16 21:30 章鱼小年糕 阅读(84) 评论(0) 推荐(0) 编辑
摘要:Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo 阅读全文
posted @ 2017-10-15 21:09 章鱼小年糕 阅读(117) 评论(0) 推荐(0) 编辑
摘要:这个题是想要找到最长回文字串,我刚开始想的是: 以每一个字符为中心,然后向两边扩展寻找,应该分为奇数和偶数为中心两种情况~ 代码应该没问题吧,但是提交上去超时了,因为后来它用的测试数据非常大啊,后来上网看了看别人的,就想着用动态规划试试看。 (然后,待续(笑)) 阅读全文
posted @ 2017-10-03 10:51 章鱼小年糕 阅读(107) 评论(0) 推荐(0) 编辑

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