Skip to content

jsantell/sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sort

Sorting algorithms in JavaScript. For academic purposes rather than production.

Sorts

Type Best Average Worst Space
Bubble Sort Ω(n) Θ(n²) O(n²) O(1)
Insertion Sort Ω(n) Θ(n²) O(n²) O(1)
Selection Sort Ω(n²) Θ(n²) O(n²) O(1)
Heap Sort Ω(n log n) Θ(n log n) O(n log n) O(1)
Merge Sort Ω(n log n) Θ(n log n) O(n log n) O(n)
Quick Sort Ω(n log n) Θ(n log n) O(n²) O(log n)
Bucket Sort Ω(n + k) Θ(n + k) O(n²) O(n)
Counting Sort Ω(n + k) Θ(n + k) O(n + k) O(k)
Radix Sort Ω(nk) Θ(nk) O(nk) O(n + k)
Cycle Sort Ω(n²) Θ(n²) O(n²) O(1)

Run/Tests

Can run tests via npm test

License

MIT License, Copyright (c) 2016 Jordan Santell

About

Sorting algorithms in JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published