1. 알고리즘 문제 풀기

https://ppang-game.tistory.com/70

 

백준 2164번 카드2 C++

queue를 사용했을 때 #include #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n = 0; cin >> n; queue q; for (int i = 1; i

ppang-game.tistory.com

 

deque(덱)

vector와 비슷한 컨테이너

삽입을 push_back()만 할 수 있는 vector와 다르게

push_front()로 원소를 추가, pop_front()로 원소를 삭제할 수 있음

 

vector는 연속된 메모리를 사용,

deque은 연속되지 않은 메모리를 사용함 -> 원소 삽입 시 vector보다 효율적

 

vector의 경우 연속된 메모리를 사용하기 때문에

메모리 재할당 시, 전체 원소를 복사, 삭제 후 다시 할당

 

컨테이너 끝에서만 삽입/제거할 때에는 vector가 가장 빠름

 

 

2. 유니티 C# 스크립팅 마스터하기 챕터 8

https://ppang-game.tistory.com/71

블로그 정리 작성중