Question: Let A [ ] be an array of n real ( decimal ) numbers, uniformly distributed from 1 to 1 0 0 . A student

Let A[] be an array of n real (decimal) numbers, uniformly distributed from 1 to 100. A student would like to print out the smallest t n numbers in increasing order. Consider the three approaches below: OPTION 11. k = n.2. p =Select(A,1, n, k).3. Loop through A[] and store all items that are less than or equal to p, in a list L 4. Sort list L in increasing order, using QuickSort. 5. Print L OPTION 21. Set-up Bucket sort using 10 equally-sized buckets in the range 1 to 100. Bucket 1 covers the range 1 to 10 inclusively. 2. Distribute the points into buckets. 3. Run insertion sort on the elements of bucket 14. Print out the sorted elements from bucket 1. OPTION 31. Loop through input A[] and set m to be the maximum element found 2. Use Counting sort with maximum-sized element m 3. Print out the first n elements from the resulting sorted array

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!