```
int Solution::removeDuplicates(vector<int> &A) {
int i = 0, j = 1, N = A.size();
if(N == 1) return A[0];
A.push_back(A[0]);
while(i < N-1 && j < N){
if(A[j] == A[i]){
//A.push_back(A[i]);
j++;
}
else {
A.push_back(A[j]);
i = j;
j+=1;
}
}
A.erase(A.begin(), A.begin()+N);
return A.size();
}
```

Hey guys! Do run this code and check. Take any custom test case and run it first. It will work **BEAUTIFULLY**. Now run the testcase of IB. It will say wrong and and give this test case : [ 0 ].

Now, that the heck is this test case?! What are those spaces around 0? I’m so pissed off right now

If anyone can figure out why I’m wrong, I’ll be in your debt. Thanks