I used liner search with 2 pointers. But i got the TLE.

```
public int singleNumber(int[] A) {
int m = 0;
int n = 1;
if(A.length == 1) {
return A[0];
}
while(A[m] != A[n] ) {
n++;
if(n==A.length) {
return A[m];
}
if(A[m] ==A[n]){
m++;
n = m+1;
}
}
return 0;
}
```