figure completing the partition process to find the split point for right_mark right_mark if right_mark left_markdone true elsetemp a_list[left_marka_list[left_marka_list[right_marka_list[right_marktemp temp a_list[firsta_list[firsta_list[right_marka_list[right_marktemp return right_mark a_list [ quick_sort(a_listprint(a_listto analyze the quick_sort functionnote that for list of length nif the partition always occurs in the middle of the listthere will again be log divisions in order to find the split pointeach of the items needs to be checked against the pivot value the result is log in additionthere is no need for additional memory as in the merge sort process unfortunatelyin the worst casethe split points may not be in the middle and can be very skewed to the left or the rightleaving very uneven division in this casesorting list of items divides into sorting list of items and list of items then sorting list of divides into list of size and list of size and so on the result is an ( sort with all of the overhead that recursion requires we mentioned earlier that there are different ways to choose the pivot value in particularwe can attempt to alleviate some of the potential for an uneven division by using technique called median of three to choose the pivot valuewe will consider the firstthe middleand the last element in the list in our examplethose are and now pick the median valuein our case and use it for the pivot value (of coursethat was the pivot value we used originallythe idea is that in the case where the the first item in the list does not belong toward the middle sorting and searching