The solution of Remove Duplicates from Sorted Array.
modify the code