- public class Solution {
-
- public int removeDuplicates(int[] nums) {
-
-
List<Integer> list = new LinkedList<>();
-
for(int a=0;a<nums.length;a++)
-
if(list.contains(nums[a]) == false)
-
list.add(nums[a]);
-
for(int a=0;a<list.size();a++)
-
nums[a] = list.get(a);
-
return list.size();
}
}
删除排序数组中的重复数字
原文:http://www.cnblogs.com/zhaolinjie/p/6523054.html