Julia makes it really easy to use the quick sort algorithm.
For array, A
, with datatype Vector{K}
, where K <: Any
, we can use the in-place sorting function sort!
with the alg
flag with QuickSort
.
sort!(A, alg=QuickSort)
In fact, by default Julia uses QuickSort for numerical array sorting and MergeSort for any others. More information on available sorting algorithms can be found in the Julia documentation for sorting.