Sorting: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
== Parameters == | == Parameters == | ||
n: size of list | $n$: size of list | ||
== Table of Algorithms == | == Table of Algorithms == | ||
Line 22: | Line 22: | ||
|- | |- | ||
| [[Naive sorting (Comparison Sorting Sorting)|Naive sorting]] || 1940 || $O( | | [[Naive sorting (Comparison Sorting Sorting)|Naive sorting]] || 1940 || $O(n^{2}) | ||
|- | |- | ||
| [[Selection Sort (Comparison Sorting Sorting)|Selection Sort]] || 1962 || $O( | | [[Selection Sort (Comparison Sorting Sorting)|Selection Sort]] || 1962 || $O(n^{2}) | ||
|- | |- | ||
| [[Merge Sort (Comparison Sorting Sorting)|Merge Sort]] || 1945 || $O(n | | [[Merge Sort (Comparison Sorting Sorting)|Merge Sort]] || 1945 || $O(n \log n) | ||
|- | |- | ||
| [[Bubble Sort (Comparison Sorting Sorting)|Bubble Sort]] || 1956 || $O( | | [[Bubble Sort (Comparison Sorting Sorting)|Bubble Sort]] || 1956 || $O(n^{2}) | ||
|- | |- | ||
| [[Intro Sort (Comparison Sorting Sorting)|Intro Sort]] || 1997 || $O(n | | [[Intro Sort (Comparison Sorting Sorting)|Intro Sort]] || 1997 || $O(n \log n) | ||
|- | |- | ||
| [[Heap Sort (Comparison Sorting Sorting)|Heap Sort]] || 1964 || $O(n | | [[Heap Sort (Comparison Sorting Sorting)|Heap Sort]] || 1964 || $O(n \log n) | ||
|- | |- | ||
| [[Counting Sort (Non-Comparison Sorting Sorting)|Counting Sort]] || 1954 || | | [[Counting Sort (Non-Comparison Sorting Sorting)|Counting Sort]] || 1954 || | ||
Line 40: | Line 40: | ||
| [[Radix Sort (Non-Comparison Sorting Sorting)|Radix Sort]] || 1940 || | | [[Radix Sort (Non-Comparison Sorting Sorting)|Radix Sort]] || 1940 || | ||
|- | |- | ||
| [[Tree sort (Comparison Sorting Sorting)|Tree sort]] || | | [[Tree sort (Comparison Sorting Sorting)|Tree sort]] || 1986 || $O(n \log n) | ||
|- | |- | ||
| [[Quick Sort (Comparison Sorting Sorting)|Quick Sort]] || 1961 || $O( | | [[Quick Sort (Comparison Sorting Sorting)|Quick Sort]] || 1961 || $O(n^{2}) | ||
|- | |- | ||
| [[Tim Sort (Comparison Sorting Sorting)|Tim Sort]] || 2002 || | | [[Tim Sort (Comparison Sorting Sorting)|Tim Sort]] || 2002 || | ||
Line 48: | Line 48: | ||
| [[Cube Sort Parallel Implementation (Comparison Sorting Sorting)|Cube Sort Parallel Implementation]] || 1992 || | | [[Cube Sort Parallel Implementation (Comparison Sorting Sorting)|Cube Sort Parallel Implementation]] || 1992 || | ||
|- | |- | ||
| [[Shell Sort | | [[Shell Sort (Shell) (Comparison Sorting Sorting)|Shell Sort (Shell)]] || 1959 || $O(n^{2}) | ||
|- | |- | ||
| [[Shell Sort | | [[Shell Sort (Frank & Lazarus) (Comparison Sorting Sorting)|Shell Sort (Frank & Lazarus)]] || 1960 || | ||
|- | |- | ||
| [[Shell Sort | | [[Shell Sort (Pratt) (Comparison Sorting Sorting)|Shell Sort (Pratt)]] || 1971 || $O(n \log^{2} n) | ||
|- | |- | ||
| [[Shell Sort | | [[Shell Sort (Sedgewick) (Comparison Sorting Sorting)|Shell Sort (Sedgewick)]] || 1986 || | ||
|- | |- | ||
| [[Bitonic Merge Sort Parallel Implementation (Comparison Sorting Sorting)|Bitonic Merge Sort Parallel Implementation]] || 1968 || $O( | | [[Bitonic Merge Sort Parallel Implementation (Comparison Sorting Sorting)|Bitonic Merge Sort Parallel Implementation]] || 1968 || $O(\log^{2} n) | ||
|- | |- | ||
| [[Thorup's Sorting Algorithm (Comparison Sorting Sorting)|Thorup's Sorting Algorithm]] || 2002 || $O(n | | [[Thorup's Sorting Algorithm (Comparison Sorting Sorting)|Thorup's Sorting Algorithm]] || 2002 || $O(n \log \log n) | ||
|- | |- | ||
| [[Naive sorting (Non-Comparison Sorting Sorting)|Naive sorting]] || 1940 || $O( | | [[Naive sorting (Non-Comparison Sorting Sorting)|Naive sorting]] || 1940 || $O(n^{2}) | ||
|- | |- | ||
| [[Flash Sort (Non-Comparison Sorting Sorting)|Flash Sort]] || 1998 || | | [[Flash Sort (Non-Comparison Sorting Sorting)|Flash Sort]] || 1998 || | ||
|- | |- | ||
| [[Bead Sort (Non-Comparison Sorting Sorting)|Bead Sort]] || 2002 || | | [[Bead Sort (Non-Comparison Sorting Sorting)|Bead Sort]] || 2002 || | ||
Line 68: | Line 68: | ||
| [[Burst Sort (Non-Comparison Sorting Sorting)|Burst Sort]] || 2004 || | | [[Burst Sort (Non-Comparison Sorting Sorting)|Burst Sort]] || 2004 || | ||
|- | |- | ||
| [[Spreadsort (Non-Comparison Sorting Sorting)|Spreadsort]] || 2002 || $O(n | | [[Spreadsort (Non-Comparison Sorting Sorting)|Spreadsort]] || 2002 || $O(n \log n) | ||
|- | |- | ||
| [[Odd Even Sort Parallel Implementation (Comparison Sorting Sorting)|Odd Even Sort Parallel Implementation]] || 1972 || | | [[Odd Even Sort Parallel Implementation (Comparison Sorting Sorting)|Odd Even Sort Parallel Implementation]] || 1972 || | ||
Line 79: | Line 79: | ||
[[File:Sorting - Time.png|1000px]] | [[File:Sorting - Time.png|1000px]] | ||
Latest revision as of 10:04, 28 April 2023
Description
A sorting algorithm is an algorithm that puts elements of a list in a certain order
Related Problems
Subproblem: Comparison Sorting, Non-Comparison Sorting
Related: Non-Comparison Sorting
Parameters
Table of Algorithms
Name | Year | Time | Space | Approximation Factor | Model | Reference |
---|---|---|---|---|---|---|
Naive sorting | 1940 | Exact | Deterministic | |||
Selection Sort | 1962 | Exact | Deterministic | |||
Merge Sort | 1945 | Exact | Deterministic | |||
Bubble Sort | 1956 | Exact | Deterministic | |||
Intro Sort | 1997 | Exact | Deterministic | Time | ||
Heap Sort | 1964 | Exact | Deterministic | Time | ||
Counting Sort | 1954 | Exact | Deterministic | Time | ||
Bucket Sort | 1940 | Exact | Deterministic | |||
Radix Sort | 1940 | Exact | Deterministic | |||
Tree sort | 1986 | Exact | Deterministic | Time | ||
Quick Sort | 1961 | Exact | Deterministic | Time & Space | ||
Tim Sort | 2002 | Exact | Deterministic | |||
Cube Sort Parallel Implementation | 1992 | Exact | Parallel | Time | ||
Shell Sort (Shell) | 1959 | Exact | Deterministic | Time | ||
Shell Sort (Frank & Lazarus) | 1960 | Exact | Deterministic | Time | ||
Shell Sort (Pratt) | 1971 | Exact | Deterministic | Time | ||
Shell Sort (Sedgewick) | 1986 | Exact | Deterministic | Time | ||
Bitonic Merge Sort Parallel Implementation | 1968 | Exact | Parallel | Time | ||
Thorup's Sorting Algorithm | 2002 | Exact | Deterministic | Time & Space | ||
Naive sorting | 1940 | Exact | Deterministic | |||
Flash Sort | 1998 | Exact | Deterministic | Time & Space | ||
Bead Sort | 2002 | Exact | Deterministic | Time | ||
Burst Sort | 2004 | Exact | Deterministic | Time | ||
Spreadsort | 2002 | Exact | Deterministic | Time | ||
Odd Even Sort Parallel Implementation | 1972 | Exact | Parallel | Time | ||
Spaghetti Sort Parallel Implementation | 1984 | Exact | Parallel | Time |