10845번: 큐(4/12)
queue의 push, pop, size, empty, front, back 해보기
queue <int> st //int 타입의 queue 선언
명령어가 문자열과 같을 때 q.push(x), q.pop(x), q.size(), q.empty(), q.front(), q.back()
2164번: 카드2(4/12)
카드번호를 큐에 넣어주고 카드가 1개 남을 때까지(size가 1) pop, push(q.front), pop을 해준다
10866번: 덱(4/13)
deque의 push_front, push_back, pop_front, pop_back, size, empty, front, back 해보기
deque <int> dq //int 타입의 queue 선언
명령어가 문자열과 같을 때 dq.push_front(x), dp.push_back(x), dq.pop_front(), dq.pop_back, dq.size(), dq.empty(), dq.front(), dq.back()
5430번: AC(4/13)
@ string에서 int형으로 바꾸기
#include<string>
string temp = "";
stoi(temp)
@ https://lu-coding.tistory.com/12
1966번: 프린터 큐
3078번: 좋은 친구 (★)
'알고리즘' 카테고리의 다른 글
| 트리(Tree) (0) | 2022.04.16 |
|---|---|
| 우선순의 큐(Priority Queue) (0) | 2022.04.13 |
| 스택(Stack) (0) | 2022.04.09 |
| 리스트(List), 배열(Array), 연결 리스트(Linked List) (0) | 2022.04.09 |
| 동적 계획법(Dynamic Programming) (0) | 2022.04.05 |