728x90
728x170
Array Sorting Algorithms
Algorithm | Time Complexity | Space Complexity | ||
---|---|---|---|---|
Best | Average | Worst | Worst | |
Quicksort | Ω(n log(n)) | Θ(n log(n)) | O(n^2) | O(log(n)) |
Mergesort | Ω(n log(n)) | Θ(n log(n)) | O(n log(n)) | O(n) |
Timsort | Ω(n) | Θ(n log(n)) | O(n log(n)) | O(n) |
Heapsort | Ω(n log(n)) | Θ(n log(n)) | O(n log(n)) | O(1) |
Bubble Sort | Ω(n) | Θ(n^2) | O(n^2) | O(1) |
Insertion Sort | Ω(n) | Θ(n^2) | O(n^2) | O(1) |
Selection Sort | Ω(n^2) | Θ(n^2) | O(n^2) | O(1) |
Tree Sort | Ω(n log(n)) | Θ(n log(n)) | O(n^2) | O(n) |
Shell Sort | Ω(n log(n)) | Θ(n(log(n))^2) | O(n(log(n))^2) | O(1) |
Bucket Sort | Ω(n+k) | Θ(n+k) | O(n^2) | O(n) |
Radix Sort | Ω(nk) | Θ(nk) | O(nk) | O(n+k) |
Counting Sort | Ω(n+k) | Θ(n+k) | O(n+k) | O(k) |
Cubesort | Ω(n) | Θ(n log(n)) | O(n log(n)) | O(n) |
728x90
그리드형(광고전용)
'Programming > C++' 카테고리의 다른 글
[header][container] queue : priority_queue (0) | 2017.11.17 |
---|---|
[header][container] queue : queue (0) | 2017.11.17 |
string형 변수 길이 구하기 (0) | 2017.11.15 |
vector 안의 원소들의 순서를 역순으로 바꾸는 방법 (0) | 2017.11.12 |
데이터 형식 범위 (0) | 2017.11.08 |
[header][C library] cwctype (wctype.h) (0) | 2017.11.08 |
[header][C library] cwchar (wchar.h) (0) | 2017.11.08 |
[header][C library] cuchar (uchar.h) (C++11) (0) | 2017.11.08 |