Sorting algorithms/Quicksort: Difference between revisions

Content added Content deleted
(need to worry about multiple pivot elements in array)
m (Added to recursion category)
Line 1: Line 1:
{{task}}
{{task}}
{{Sorting Algorithm}}
{{Sorting Algorithm}}
[[Category:Recursion]]


In this task, the goal is to sort an array (or list) of elements using the [http://en.wikipedia.org/wiki/Quicksort Quicksort] algorithm. The elements must have a total order and the index of the array can be of any discrete type. For languages where this is not possible, sort an array of integers. The algorithm goes like this (from the wiki):
In this task, the goal is to sort an array (or list) of elements using the [http://en.wikipedia.org/wiki/Quicksort Quicksort] algorithm. The elements must have a total order and the index of the array can be of any discrete type. For languages where this is not possible, sort an array of integers. The algorithm goes like this (from the wiki):