摘要: Given a non-negative integer represented as a non-empty array of digits, plus one to the integer. You may assume the integer do not contain any leadin 阅读全文
posted @ 2017-03-14 15:48 Ci_pea 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word 阅读全文
posted @ 2017-03-14 15:16 Ci_pea 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Find the contiguous(连续的) subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4, 阅读全文
posted @ 2017-03-14 14:52 Ci_pea 阅读(122) 评论(0) 推荐(0) 编辑
摘要: The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11.11 is read off 阅读全文
posted @ 2017-03-14 10:57 Ci_pea 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or 阅读全文
posted @ 2017-03-13 10:55 Ci_pea 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 阅读全文
posted @ 2017-03-13 10:26 Ci_pea 阅读(158) 评论(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-03-13 09:49 Ci_pea 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space fo 阅读全文
posted @ 2017-03-10 10:56 Ci_pea 阅读(88) 评论(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. 上面程序Fail 阅读全文
posted @ 2017-03-10 10:33 Ci_pea 阅读(110) 评论(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-03-06 13:58 Ci_pea 阅读(96) 评论(0) 推荐(0) 编辑