Create remove duplicates from sorted array

first practice on leetcode