LeetCode #283

Move Zeroes

1개의 풀이 · C++

문제 원문 보기 ↗

SOLUTION INFO

C++ · main.cpp

main.cpp
#pragma optimize("Ofast")
#pragma optimize("unrolls-loop")

class Solution {
public:
    void moveZeroes(vector<int>& nums) {
        ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
        for(vector <int>::iterator it = std::remove(nums.begin(), nums.end(), 0); it != nums.end(); it++)
            *it = 0;
    }
};

SOLUTION DESCRIPTION

풀이 설명

등록된 풀이 설명이 없습니다.