class Solution {
public void moveZeroes(int[] nums) {
int l = 0;//慢指针但先走
for (int r = 0; r < nums.length; r++) {//快指针,遍历次数
if (nums[r] == 0)
continue;//l比r先到,在此处定住l,r继续移动
int t = nums[l];
nums[l] = nums[r];
nums[r] = t;
l++;
}
}
}