c++39 [C++] STL - container - stack(스택) STL 1. container(컨테이너) ㄴ개거체들을 저장하는 객체나 클래스 vector(배열), list(링크드 리스트), deque(덱), string(문자열 전용 컨테이너), map , stack(스택)( 2023. 2. 28. [C++] 절댓값 구하기 abs()함수 ex) int a=-10; int b=abs(a); cout 출력 : 10 int형의 절댓값 구하기 : #include 에 int abs(int n)가 들어있다. ㄴ long int , long long int 도 됨 float, double형의 절댓값 구하기 : #include 에 float abs(float x), double abs(double x)가 들어있다. ㄴ long double 도 됨 2023. 2. 27. [C++] STL - containers STL : -algorithms -containers -functions -literators 컨테이너는 배열과 같이 여러 개의 값을 저장할 수 있는 구성단위이다. 1. vector 2. map 3. stack 2023. 2. 25. [C++] STL - <algorithm> STL 4개로 구성되어 있다. (이것들을 미리 만들어 놓은 라이브러리이다.) -algorithms 두 번째 인자 이면 내림차순으로 정렬한다. stable_sort는 내부적으로 merge sort로 구현되어 있다. merge sort는 이런 시간 복잡도를 가지고 있다. 즉, 항상 O(n x log n)의 시간 복잡도를 보장하는 정렬 알고리즘이다. https://www.geeksforgeeks.org/stable_sort-c-stl/ stable_sort() in C++ STL - GeeksforGeeks A Computer Science portal for geeks. It contains well written, well thought and well explained computer science an.. 2023. 2. 25. 이전 1 2 3 4 5 ··· 10 다음