摘要: 题目: Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. (Easy) 分析: 不用考虑KMP啥的 阅读全文
posted @ 2016-08-16 21:18 wangxiaobao1114 阅读(184) 评论(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, 阅读全文
posted @ 2016-08-16 21:15 wangxiaobao1114 阅读(97) 评论(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 spac 阅读全文
posted @ 2016-08-16 21:10 wangxiaobao1114 阅读(192) 评论(0) 推荐(0) 编辑