sec quicksort initial pass swap pass swap pass , figure the quicksort partition step the first row shows the initial positions for collection of ten key values the pivot value is which has been swapped to the end of the array the do loop makes three iterationseach time moving counters and inwards until they meet in the third pass in the endthe left partition contains four values and the right partition contains six values function qsort will place the pivot value into position pivot pivot pivot pivot pivot pivot pivot final sorted array figure an illustration of quicksort