Can someone please explain to me how they managed to get their answer to 3b)?
Did they swap the middle pivot with the first element, sort the lower sublist,
and then replace the middle pivot?
Or did they just start swaping elements according to the pivot,
finding the middle pivot of the lower sublist and sorting those elements.
When I did it this way in the assignment: finding the middle pivot, swapping the elements,
then partitioning the list and repeating the process, it was marked wrong.
I have gone through the text book and various other websites which explain the quicksort algorithm,
I still can't figure out how they got their answer.
Any help would be welcome,
Ben