Update removeDuplicateFromSortedArray