/*
* @lc app=leetcode id=283 lang=cpp
*
* [283] Move Zeroes
*/
// @lc code=start
class Solution {
public:
void moveZeroes(vector<int>& nums) {
int N = nums.size();
int L = 0;
int T = 0;
while(L+T<N){
while(L<N && nums[L] != 0) L++;
T++;
while(L+T<N && nums[L+T] != 0){
swap(nums[L],nums[L+T]);
L++;
}
}
}
};
// @lc code=end