Suppose that L is a list of 10,000 elements. Find the average number of comparisons made by quick...1 answer below »

1. Suppose that L is a list of 10,000 elements. Find the average number of comparisons made by bubble sort, selection sort, and insertion sort to sort L.

2. Suppose that L is a list of 10,000 elements. Find the average number of comparisons made by quick sort and merge sort to sort L.

3. Suppose that the elements of a list are in descending order and they need to be put in ascending order. Write a C++ function that takes as input an array of items in descending order and the number or elements in the array. The function rearranges the element of the array in ascending order. Your function must not incorporate any sorting algorithms, that is, no item comparisons should take place.

Jan 27 2021 04:06 PM

1 Approved Answer

Ruchi Y
answered on
January 29, 2021

5
Ratings,(17 Votes)

Answer:

1.

2.

3.

Please find the attached C++ program file with sample output.

## 1 Approved Answer

January 29, 2021Answer:

1.

2.

3.

Please find the attached C++ program file with sample output.

Sample output:

## Do you need an answer to a question different from the above? Ask your question!

Tell us more

(Hide this section if you want to rate later)

Was the final answer of the question wrong?

Were the solution steps not detailed enough?

Was the language and grammar an issue?

Does the question reference wrong data/report

or numbers?

Stay Solved :)

5 seconds## Didn't find yours?

Ask a new questionGet plagiarism-free solution within 48 hours

Review Please