leetcode之数组
CuteRainbow
我是一个热爱生活的人
展开
-
【LeetCode】之Remove Duplicates from Sorted Array
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 for another array, you must do this in place with cons原创 2015-09-02 18:39:05 · 221 阅读 · 0 评论 -
【LeetCode】之Remove Duplicates from Sorted Array II
Follow up for “Remove Duplicates”: What if duplicates are allowed at most twice?For example, Given sorted array nums = [1,1,1,2,2,3],Your function should return length = 5, with the first five elemen原创 2015-09-02 20:30:40 · 214 阅读 · 0 评论