class Solution {
public int removeDuplicates(int[] nums) {
int n= nums.length;
if (n == 0) return 0;
int distinc = 0;//(distinct)不同元素个数,初始为0
for (int i=0; i<n-1
2. array--删除排序数组中的重复项
最新推荐文章于 2023-10-07 19:08:37 发布