```
void moveZeroes(vector<int>& nums)
{
int zero_num = count_if(nums.begin(), nums.end(), [](int i){return i == 0; });
auto it = remove_if(nums.begin(), nums.end(), [](int i){return i == 0; });
nums.erase(it, nums.end());
while (zero_num--) nums.push_back(0);
}
```