vector unique1 46★] 프로그래머스 같은 숫자는 싫어 #include #include using namespace std; vector solution(vector arr) { arr.erase(unique(arr.begin(), arr.end()), arr.end()); return arr; } stackoverflow.com/questions/1041620/whats-the-most-efficient-way-to-erase-duplicates-and-sort-a-vector What's the most efficient way to erase duplicates and sort a vector? I need to take a C++ vector with potentially a lot of elements, erase duplicates, and sor.. 2020. 9. 15. 이전 1 다음