I returned 0 for this case, however, the judgement needs "[]", while there must be an integer to be returned, I am confused about what exactly should I return for this problem? Thanks for any hints. Here is my code, and could any one point out where I am wrong?

```
int removeDuplicates(int arr[], int n) {
if (arr == NULL) return 0;
int ind = 1;
int cur = 1;
while (cur < n) {
if (arr[cur] != arr[cur-1]) {
arr[ind++] = arr[cur];
}
++cur;
}
return ind;
}
```

The above code always gets a hint from the judge of returning "[]" which is a NULL pointer rather than an integer demanded by the function return type, finally I find out where I am wrong, the input pointer could be non-NULL with n equals to 0. So the special case should be:

```
if (n == 0) {arr = NULL; return 0;}
```

As a conclusion, I strongly suggest input cases to be clarified in this problem, so we would not be confused by the hint from the judge!!