[코딩 스킬] 유용한 팁 사이트
[참고]
1. C++ sort 함수 : https://blockdmask.tistory.com/178
[C++] sort algorithm 정리 및 예시
안녕하세요 BlockDMask 입니다. 오늘은 C++ STL 에서 제공하는 알고리즘 중에 sort 알고리즘에 대해 알아보겠습니다. 0. sort algorithm sort 알고리즘은 헤더파일에 속해있습니다. sort(start, end)..
blockdmask.tistory.com
2. C++11이상 컴파일러 환경에서 string <-> int 변환
[C++] string to int, int to string
string to int - string에서 int로 변환 atoi()함수 사용. -> atoi(char*) 인자가 char*형이기 때문에 c_str()함수로 변환해주어야함. string str = "34"; int intValue = atoi(str.c_str()); int to string - int..
arer.tistory.com
3. priority_queue 활용
STL priority queue 활용법
모든 nlgn들의 영웅(?) 같은 priority_queue 존재 그 자체로 멋지지만 정말 멋지게 쓰기 위해서는 제대로 활용할 줄 알아야 할 것이다. 1. Colored By Color Scripter™ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1..
koosaga.com
4. priority_queue 활용 2
https://testkernel.tistory.com/112
c++ priority_queue
문제 풀이 시 우선순위 큐를 직접 구현하여 사용한다면 정말 좋겠지만, 시간 상 직접 구현하는 것 보다는 STL에 있는 것을 그대로 가져다 사용하는 것도 하나의 방법이 될 수 있다. 여기서는 STL에 priority_queue..
testkernel.tistory.com