上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 46 下一页
  2017年7月20日
摘要: Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". 模拟二进制相加,右对齐,然后每位相加....不知道字符串左加和右加对性能有没有影响 阅读全文
posted @ 2017-07-20 13:45 Beserious 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 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-07-20 11:51 Beserious 阅读(156) 评论(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-07-20 11:48 Beserious 阅读(93) 评论(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,-1,2, 阅读全文
posted @ 2017-07-20 08:13 Beserious 阅读(115) 评论(0) 推荐(0) 编辑
  2017年7月19日
摘要: 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-07-19 21:03 Beserious 阅读(131) 评论(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-07-19 20:08 Beserious 阅读(90) 评论(0) 推荐(0) 编辑
摘要: Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 字符串Rabin--Karp算法。滚动哈希,时间 阅读全文
posted @ 2017-07-19 19:43 Beserious 阅读(91) 评论(0) 推荐(0) 编辑
  2017年7月18日
摘要: 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-07-18 16:12 Beserious 阅读(102) 评论(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-07-18 16:00 Beserious 阅读(77) 评论(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. 注意边界,注意边 阅读全文
posted @ 2017-07-18 15:47 Beserious 阅读(126) 评论(0) 推荐(0) 编辑
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 46 下一页