```
int removeDuplicates(int* nums, int numsSize) {
int j=0;
int i;
int standard= nums[0]+1;
if(numsSize<=0) return 0;
for(i=0;i<numsSize;i++)
{
if(nums[i] == standard)
continue;
else
{
nums[j++]= nums[i];
standard = nums[i];
}
}
return j;
}
```