# Remove Duplicates from Sorted Array

Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this in place with constant memory.

Example

```
A = [1, 1, 2, 3, 3, 4], length = 6
Becomes
A = [1, 2, 3, 4, x, x], length = 4
```