Recursive Quicksort Algorithm
if first < last then
partition(a,first,last,loc)
quicksort(a,first,loc-1)
quicksort(a,loc+1,last)
The pivot can be any of the array elements, such as the leftmost one.
Pivot = a[first]
Previous slide
Next slide
Back to first slide
View graphic version