Skip to content

jrheiner/sorting-algorithms

Repository files navigation

Sorting algorithms

Implementation and benchmark of common sorting algorithms in Python.

Results

average of 50 runs

Algorithm Complexity n avg. Time
#1 Quicksort Ω(n log(n)) / O(n^2) 500 0.0009996891s
~ ~ 1000 0.0020089149s
~ ~ 5000 0.0079977512s
#2 Insertionsort Ω(n) / O(n^2) 500 0.0130112171s
~ ~ 1000 0.0200052261s
~ ~ 5000 6.0013675689s
#3 Selectionsort Ω(n^2) / O(n^2) 500 0.0140054225s
~ ~ 1000 0.0649917125s
~ ~ 5000 6.0233786106s
#4 Bubblesort Ω(n^2) / O(n^2) 500 0.0469849109s
~ ~ 1000 0.1209568977s
~ ~ 5000 7.0383956432s

About

Implementation and benchmark of common sorting algorithms in Python.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages