Question: Problem 3 We covered COUNTING SORT in class. a. For input array A[1...nl of elements in 10,... ,k], describe in one sentence the purpose of

![array A[1...nl of elements in 10,... ,k], describe in one sentence the](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3a9eb69b35_77866f3a9ead09c8.jpg)
Problem 3 We covered COUNTING SORT in class. a. For input array A[1...nl of elements in 10,... ,k], describe in one sentence the purpose of 'PHASE I' in Counting Sort, and give the corresponding pseudocode b. How could you avoid 'Phase II' of counting sort and still print the elements of array A1...nl in sorted order? Please give the pseudocode for this modification of COUNTING SORT. c. What is the name of the below MYSTERYPROCEDURE? e. What assumptions for the input data were made in class in order to guarantee that Bucket Sort runs in linear time for the average case? MYSTERYPROCEDURE(A) 1 for i1 to lenqth A do for j length [A] downto i + 1 3 then exchange A Ali-11
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
