Remove duplicates from sorted array I and II.