2019年9月27日

摘要: 大致思路:对数组的元素进行遍历,把不为0的元素放在数组的前面,记录最后一个不为零的元素的下标,然后把之后的元素置为0 代码: void moveZeroes(int* nums, int numsSize){ int i=0,j=0; if(numsSize==0) return; for(i=0; 阅读全文

posted @ 2019-09-27 21:28 辉仔猿 阅读(97) 评论(0) 推荐(0)