File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ # Comparison of all sorting algorithms
2+
3+ | Algorithm | Complexity | When to use? |
4+ | ----------------------------| -----------------------------------------------------| --------------|
5+ | 3-way-string-quicksort.js | O(N^2) | |
6+ | bubblesort.js | O(N^2) | |
7+ | bucketsort.js | O(N) | |
8+ | countingsort.js | O(N) | |
9+ | heapsort.js | O(N log N) | |
10+ | insertion-binary-sort.js | O(N^2) | |
11+ | insertionsort.js | O(N^2) | |
12+ | lsd.js | O(N* M) for N keys which have M or fewer digits | |
13+ | mergesort.js | O(n log(n)) | |
14+ | msd.js | O(N* M) for N keys which have M or fewer digits | |
15+ | oddeven-sort.js | O(N^2) | |
16+ | quicksort-middle.js | O(N log(N)) | |
17+ | quicksort.js | O(nlog n) | |
18+ | radixsort.js | O(N K) for N keys with K being | |
19+ | recursive-insertionsort.js | O(N^2) | |
20+ | selectionsort.js | O(N^2) | |
21+ | shellsort.js | O((nlog(n))^2) | |
You can’t perform that action at this time.
0 commit comments