class Solution { public int removeDuplicates(int[] nums) { int a = 1; for(int i = 0 ; i < nums.length-1; i++ ){ if(nums[i] != nums[i+1]){ nums[a]=nums[i+1]; a++; } } return a; } }
day01
标签:26,删除,nums,int,++,数组 From: https://www.cnblogs.com/Icy01/p/17121156.html