int removeElement(int* nums, int numsSize, int val){ int left = 0; int right = 0; while (right < numsSize){ if (nums[right] != val){ nums[left] = nums[right]; left ++; } right ++; } return left; }
标签:numsSize,right,nums,--,int,数组,left,指针 From: https://www.cnblogs.com/shunguo/p/17723002.html