```
class Solution {
public:
void moveZeroes(vector<int>& nums) {
int pt = 0;
if (nums.size()==0 || nums.size()==1) return;
for (int i=0;i<nums.size();i++){
if (nums[i]!=0){
nums[pt] = nums[i];
pt++;
}
}
for (int i=pt;i<nums.size();i++) nums[i]=0;
}
};
```