摘要: 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 @ 2019-06-03 15:56 lpomeloz 阅读(94) 评论(0) 推荐(0) 编辑
摘要: Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Example 2: Cla 阅读全文
posted @ 2019-06-03 11:26 lpomeloz 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 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 space for another ar 阅读全文
posted @ 2019-06-03 10:50 lpomeloz 阅读(226) 评论(0) 推荐(0) 编辑
摘要: Share Share Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not alloca 阅读全文
posted @ 2019-06-03 10:31 lpomeloz 阅读(98) 评论(0) 推荐(0) 编辑