Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

There are 100 integer numbers in range [1,100]. You are supposed to sort the num

ID: 3635332 • Letter: T

Question

There are 100 integer numbers in range [1,100]. You are supposed to sort the numbers in ascending order. E.g. 1,3,4,7,11,23, ...... We know that there are dozen of sorting algorithms, such as quick sort, merge sort, bubble sort, counting sort, heap sort etc. But you have to use the following procedure: Step 1: Find the smallest number and its indis in the original array namely A[]. Step 2: Add the smallest number to a new array namely B[]. Step 3: Change the value of the smallest number to -1 in A. Step 4: Repeat step 1-3 untill all numbers is -1 in A. Actually 100 times. Step 5: Print out the sorted array B.

Explanation / Answer

Dear Friend here is the program u want PLEASE RATE void sort(int A[],int B[],int size) { int min=101; int loc; for(int i=0;i