Hello,

I am reading about basic quick sort and I have questions to ask about how it works.

First of all, the book says that there are 3 parts to quick sort. A head and tail pointer and a partition value. So, what is a partition value?

Secondly, the book uses the leftmost element of the array as the partition element. I presume the leftmost element is the head pointer. So, is it a must or recommended that the head pointer is used as the partition element?

Thirdly, does the head and tail pointers move towards each other at the same time? Or does the tail pointer move leftwards first, then the head pointer move rightwards?

Fourth, when does swapping of elements occur? And when partitioning is complete, there will be subarrays. So,will the quick sort process be done on each of these subarrays?

By the way, the book I am reading is ' C/C++ Annonated Archives' published by Osbourne.

Thanks for the reply.