my solution:
1. remove the duplicates of sorted array
2. return the new length of the array
i=1;j=2;
if(A[i]=A[j])
是:
i++,j++
否:
j++;
return i;
my solution:
1. remove the duplicates of sorted array
2. return the new length of the array
i=1;j=2;
if(A[i]=A[j])
是:
i++,j++
否:
j++;
return i;