Another clarification regarding this question - in general, all we want is your method to gain three goals:
1. Correctly sort the original list.
2. Do that in place (and without additional memory allocated, apart from a constant amount of memory).
3. Have some element of randomization (for time complexity reasons).
The guidelines were given (hopefully..) to help you think in a good direction. So, even if you don't apply those guidelines to your code but gain those three targets - that's perfectly OK.
As for the guidelines: I will slightly change the sentence written here: … Currently, the only "pivot" this function can recognize is its default: end of current sub list. This might have been confusing (due to the usage of list and sub list all together), but the three stages to possibly solve the question are:
1. Write this Partition function (which always takes the last element of its current sub list as a pivot).
2. Write a version of in place quicksort using this Partition function (this function is currently deterministic in its process).
3. Apply one little change to the code, to gain some randomization (in the sorting process).
If Partition function had chosen the pivot to be the last element of the original list - bad things would have happened..
I hope this is better explained now.