Remove duplicates from sorted array II