stella v0.3.0 Quicksort

Documentation for Quicksort algorithm

Annotations

  • n - number of elements in list

Link to this section Summary

Functions

Sort list Pesimistic complexity: O(n^2) Normal complexity: O(nlgn)

Link to this section Functions

Sort list Pesimistic complexity: O(n^2) Normal complexity: O(nlgn)

Examples

# iex> Quicksort.sort([4, 1, 3, 2]) # [1, 2, 3, 4]

# iex> Quicksort.sort([-2.0, 0, 4, 1, 3, 2]) # [-2.0, 0, 1, 2, 3, 4]