Implementation of some of comparison based sorting algorithms
This repository shows implementation for the Major Sort Algorithm.
Aim not to use LINQ or similar ease to use, but memory unefficient technique.
Suppose to work on following platform.
Language | Platform | Remarks |
---|---|---|
C# | .NET 9.0 | |
Go | ?? | not yet. |
PowerShell | PowerShell Core | not yet. |
Pythom | 3.x | not yet. |
Swift | 4.x | not yet. |
Algorithm | Stable | Space | Order | Remarks |
---|---|---|---|---|
Counting Sort | O | n + r | n + r | Need numeric key for T use. |
Radix4 Sort (LSD) | O | n + 2^d | n*k/d | Need numeric key for T use. (Radix10 use mod.) |
Algorithm | Stable | Space | Order | Remarks |
---|---|---|---|---|
QuickSort Median9(with BinaryInsertSort) | X | log n | n log n | May better on “Reversed, Mountain and NearlySorted” cases. But InsertSort shows a bit better performance on random. |
QuickSort Median9(with InsertSort) | X | log n | n log n | Better than pure QuickSort Median 3 version and DualPivot QuickSort. |
QuickSort DualPivot(InsertSort) | X | log 2n | n log n | Better than Median 3. Slightly unefficient on “Reversed, Mountain and NearlySorted” cases. |
IntroSort | X | log n | n log n | MergeSort has some bug on this implementation. Need fix. |
ShiftSort | O | n | n log n | Better than MergeSort and is Stable. |
TimSort | O | n | n logg n | Not implemented yet. |