package
0.11.0
Repository: https://github.com/moorara/algo.git
Documentation: pkg.go.dev

# README

SortBest CaseAverage CaseWorst CaseMemoryComment
SelectionN2 / 2N2 / 2N2 / 21N exchanges
InsertionN2 / 2N2 / 2N2 / 21Stable, N exchanges, Suitable for small N
ShellN??1Tight code, Subquadratic
MergeNlgNNlgNNlgNNStable, NlgN guarantee, Extra memory
MergeRecNlgNNlgNNlgNNStable, NlgN guarantee, Extra memory
HeapNlgNNlgNNlgN1NlgN guarantee
QuickNlgN2NlnNN2 / 2clogNNlgN probabilistic guarantee
Quick3WayN2NlnNN2 / 2clogNFaster in presence of duplicate keys

By running benchmarks, you can compare the performance of these algorithms with each other and also with built-in sort algorithm of go.