본문 바로가기

[C++] Data Structure & Algorithm/Sorting3

[Sorting] Chapter 03. 퀵 정렬 GitHub : https://github.com/developeSHG/Data_Structure-Algorithm/commit/2260b9e13b4c3da9221ca71a6b6d7a1515995208 퀵 정렬 · developeSHG/Data_Structure-Algorithm@2260b9e developeSHG committed Aug 14, 2023 github.com 퀵 정렬은 병합 정렬과 마찬가지로, 데이터를 둘 씩 쪼개서 진행하는 것은 비슷하다. 근데 병합 정렬은 시작부터 반으로 쪼갠 다음, 왼쪽 그룹과 오른쪽 그룹을 따로 정렬해서 정렬된 양 쪽 그룹을 합치는 형태로 조립했었다. 하지만 퀵 정렬은 처음부터 분할하기 보다는 어느정도 특정 알고리즘을 적용시켜 추출한 다음에, 왼쪽 그룹과 오른쪽 그.. 2023. 8. 14.
[Sorting] Chapter 02. 힙 정렬과 병합 정렬 GitHub : https://github.com/developeSHG/Data_Structure-Algorithm/commit/2a955748fbaf3cbd0f5cf002a83f51d2bb347387 힙 정렬과 병합 정렬 · developeSHG/Data_Structure-Algorithm@2a95574 developeSHG committed Aug 14, 2023 github.com #include #include #include #include #include using namespace std; #include // 오늘의 주제 : 정렬 // C# 자료구조/알고리즘 // -> A* OpenList (PQ) // -> C# List = C++ vector // PQ O(logN) // Red-Bla.. 2023. 8. 14.
[Sorting] Chapter 01. 기본 정렬 (버블, 선택, 삽입) GitHub : https://github.com/developeSHG/Data_Structure-Algorithm/commit/0a525688c3203b9ea67f96a493d765e55d7d8694 기본 정렬 (버블, 선택, 삽입) · developeSHG/Data_Structure-Algorithm@0a52568 developeSHG committed Aug 14, 2023 github.com C++이 아니라 C#이라고 잠시 생각보자. 참고로 이전에, A* 알고리즘에서 OpenList를 만들었는데 그것을 PQ(우선순위 큐)로 만들어 관리하고 있었다. 근데 고민해보면 왜 우선순위 큐를 사용하느냐? 란 생각이 들 수 있다. C#에선 List가 C++에서 vector에 해당하는 자료구조인데, C# Lis.. 2023. 8. 14.