int removeDuplicates(int A[], int n) { // Start typing your C/C++ solution below // DO NOT write int main() function if(n == 0) return n; int i; int result = 0; for(i = 1; i < n; i++){ if(A[i] != A[result]){ A[result+1] = A[i]; result++; } } return result+1; }