Given a sorted array, remove duplicates from the array in place and return the new length. Note that we are not allowed to use any extra space other than the original array.
Example: a = [1, 1, 1, 2, 2, 3] ans = 3 array should be modified to [1, 2, 3, ...] with new length being 3.
We can solve this problem using two pointers approach.
We can leverage the fact that the array is sorted determine the unique elements and put them at the beginning of the array.