vector<int> v
queue<string> q
Queue : FIFO, BFS(넓이우선탐색) 많이 사용 push pop front
Stack : LIFO, DFS(depth first) , push pop top
Priority Queue : about heap // 잘 안썼
Vector: vector<int>iterator it = a.beginf(); it!=a.end(); ++it , push_back ,pop_back , 포인터
Pair : 큐에 스택에 다 pair로 삽입 가능, pair<int,int> p1 , p1.first, p1.second, make_pair(1,2)
Set : 중복 x , 균형이진트리 ? , 정렬도 해줌, set<int>s; s.insert(2) 이렇게 중복이 없으면서 정렬도 가능
Map : 중복 x , Set과 달리 key, value로 저장한다. map<int,int> m; m.insert(pair<int,int>(65,100));
pair<int,int>p (9,50); m.insert(p) // 가능, m[11] =20 -> 11, 20 형태로 저장 ,
머,, 일단 자주 쓰는거 , ,, 이정도 , , ,
'알고리즘까먹지말게' 카테고리의 다른 글
드디어 BFS/DFS 해보겠습니다. (0) | 2020.08.06 |
---|---|
자료구조 이것저것 정리 (0) | 2020.07.28 |
자구 4번째 과제(infix to postfix) (0) | 2020.07.28 |
STL Stack 이것저것 사용 (0) | 2020.06.09 |
Single LinkedList 기초 (0) | 2020.06.03 |