摘要: 69. Sqrt(x) Implement int sqrt(int x). Compute and return the square root of x, where x is guaranteed to be a non-negative integer. Since the return t 阅读全文
posted @ 2018-07-12 21:50 ssml 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 67. Add Binary Given two binary strings, return their sum (also a binary string). The input strings are both non-empty and contains only characters 1  阅读全文
posted @ 2018-07-12 20:45 ssml 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 66. Plus One Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most 阅读全文
posted @ 2018-07-12 16:00 ssml 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 58. Length of Last Word Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the 阅读全文
posted @ 2018-06-22 11:26 ssml 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 53. Maximum Subarray Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return i 阅读全文
posted @ 2018-06-22 10:27 ssml 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 38. Count and Say The count-and-say sequence is the sequence of integers with the first five terms as following: class Solution {public: string countA 阅读全文
posted @ 2018-06-14 11:16 ssml 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 35. Search Insert Position Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would b 阅读全文
posted @ 2018-06-13 20:52 ssml 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 28. Implement strStr() Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 解题思路: 1)判断needle字符串长度, 阅读全文
posted @ 2018-06-13 15:48 ssml 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 27. Remove Element Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra s 阅读全文
posted @ 2018-06-13 15:25 ssml 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 26. Remove Duplicates from Sorted Array Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return t 阅读全文
posted @ 2018-06-13 15:03 ssml 阅读(98) 评论(0) 推荐(0) 编辑