Leetcode problem Remove Duplicates from Sorted Array