leetcode 283 2015-12-19 算法 123456789101112void moveZeroes(int* nums, int numsSize) { //int zeros = 0; for(int i = numsSize-1;i >= 0;i--){ if(nums[i] == 0){ for(int j = i;j < numsSize-1;j++){ nums[j] = nums[j+1]; } nums[numsSize-1] = 0; //zeros++; } }} 最后更新时间:2023-06-23 16:56:15 欢迎评论~ Prev leetcode 100 Next leetcode 237