Sort 3, 5, 2, 1, 5, 9, 4, 7, 6, 3 using Quicksort withmedian-of-three partitioning. Assume a cutoff of 3, i.e. once apartition size reaches 3, the elements are sorted by explicitcomparison. You do not have to show each step of the i and jpointers, but clearly indicate which elements are swapped in eachstep. Assume that the three candidate elements are not pre-sortedwhen selecting the pivot, but that the pivot is moved to the end ineach step.
Please write out the answer and don’t give code.
Expert Answer
Answer to Sort 3, 5, 2, 1, 5, 9, 4, 7, 6, 3 using Quicksort with median-of-three partitioning. Assume a cutoff of 3, i.e. once a p…