Two Pointers moving in the same direction

Remove duplicates from sorted array

Given a sorted list of numbers, remove duplicates and return the new length. You must do this in-place and without using extra memory. Input: `0, 0, 1, 1, 1, 2, 2` Your function should modify the list in place so the first 3 elements becomes `0, 1, 2`