← 返回 meta 的题目列表Remove Duplicates
类型:online_judge
Given a sorted array, remove the duplicates in place such that each element appears only once and return the new length. Do not allocate extra space for another array, you must do this by modifying the input array in place with O(1) extra memory.
Example
Input
[1,1,2]