Quicksort (stella v0.7.1)
Documentation for Quick sort
algorithm. All important
informations about counting sort you can find on
Wikipedia page.
annotations
Annotations
- n - number of elements in list
Link to this section Summary
Link to this section Functions
Link to this function
run(list)
Sort list
- Pesimistic complexity: O(n^2)
- Normal complexity: O(nlgn)
examples
Examples
iex> Quicksort.run([4, 1, 3, 2])
[1, 2, 3, 4]
iex> Quicksort.run([-2.0, 0, 4, 1, 3, 2])
[-2.0, 0, 1, 2, 3, 4]