摘要: 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) 编辑