Question: Write a template BubbleSort function to sort an array in descending order. The function should also output the number of iterations that were completed
Write a template BubbleSort function to sort an array in descending order. The function should also output the number of iterations that were completed in terms of getting a completely sorted array. Write a driver program to sort through 3 different arrays: int array [5] = (2, 1, 8, -3, 10); double array[6] = (5.6, 9.4, 1.2, 3.3, 8.7, 1.1); char array[4] = ('T', 'A', !', 'b'); The program should output each array sorted in descending order.
Step by Step Solution
There are 3 Steps involved in it
Heres a template BubbleSort function written in C to sort an array in descending order It also outputs the number of iterations required to obtain a c... View full answer
Get step-by-step solutions from verified subject matter experts
