Question: Consider an array of numbers, A[7] = {12, 8, 1, -3, 16, 7, -7}. You are asked to sort A in the ascending numeric order.
![Consider an array of numbers, A[7] = {12, 8, 1, -3,](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3b02575e73_37366f3b025052a2.jpg)
Consider an array of numbers, A[7] = {12, 8, 1, -3, 16, 7, -7}. You are asked to sort A in the ascending numeric order. Answer the following questions. (30%) a. Perform insertion sort on A for the first two iterations. You only need to write down the result of A after each iteration. b. Perform merge sort on A for the first two conquers. You only need to write down the result of A after each conquer. c. Perform quicksort on A for up to two partitions. You are going to select the last element as the pivot, and hide the pivot at the last position. You only need to write down the result of A after each partition. In addition, use a bracket to indicate the pivot of the corresponding partition
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
