Implementation of Quicksort
If anything to be partitioned
THEN
choose a pivot
REPEAT
scan from left to right until we find an element > pivot: i points to it
scan from right to left until we find an element < pivot: loc points to it IF i < loc
THEN
exchange pivot and locth element
UNTIL i > loc
Previous slide
Next slide
Back to first slide
View graphic version