标签:
public class Solution { public void MoveZeroes(int[] nums) { int i=0; int j=0; while(j<nums.Length){ if(nums[j]!=0){ if(j!=i){ nums[i++]=nums[j]; nums[j]=0; }else{ ++i; } } ++j; } } }
Move Zeroes
原文地址:http://www.cnblogs.com/danwang/p/5551212.html