Step 3 - Recursion

We now must recursively apply the same procedure to both the left and right partitions.

Here is the result of the pass on the left partition. 32 is now said to be sorted. If we look at what we have so far we have -

The stars represent the elements which are considered sorted. Now again the left partition must be sorted.

11 is now sorted. The left partition now has only got one element in it. This means it must be already sorted so we leave it alone. Next we check the right partition. It is only one element so must be sorted. We now get the following result.