a. The number of comparisons in the best case of a bubble sort algorithm, as given in this chapter, is O(n2). Show that the following version of the bubble sort algorithm reduces the number of comparisons in the best case of the bubble sort algorithm to O(n).
b. Using the algorithm given in part (a), find the number of iterations that are needed to sort the following list:
65, 14, 52, 43, 75, 25, 80, 90, 95
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.