set #stl #c++
-
[C++/STL] set은 무엇인가? [중복제거용, 존재체크용]ComputerScience/STL 2020. 5. 27. 23:35
set이라는 애를 배워보자... std::set is an associative container that contains a sorted set of unique objects of type Key. Sorting is done using the key comparison function Compare. Search, removal, and insertion operations have logarithmic complexity. Sets are usually implemented as red-black tree. 무엇인가 하오니 해석해보면 set은 타입키의 고유한(중복이 없는) 객체의 정렬된 세트를 포함하는 연관 콘테이너이다. 정렬은 Compare함수를 통한 정렬을 통해 이루어진다. 검색, 제거, 삽입..