Problem:
Question 1- Both the merge sort and quick sort algorithms sort a list by partitioning it. Explain how the merge sort algorithm differs from the quick sort algorithm in partitioning the list.
Question 2- Assume the following list of keys: 36, 55, 89, 95, 65, 75, 13, 62, 86, 9, 23, 74, 2, 100, 98 This list is to be sorted using the quick sort algorithm as discussed in this chapter. Use pivot as the middle element of the list.
Part 1- Give the resulting list after one call to the function partition.
Part 2- What is the size of the list that the function partition partitioned?
Part 3- What are the sizes of the two sublists created by the function partition?
Please show code with comments so I can follow what you are doing.