Question: Write a C++ program that creates three identical 5000 elements integer lists, list1, list2 and list3 (do this in whatever way you see fit). We

Write a C++ program that creates three identical 5000 elements integer lists, list1, list2 and list3 (do this in whatever way you see fit). We want the lists to be identical, so I recommend you randomly generate the 5000 values for list1 and then copy those elements to list2 and list3 (make sure you do a deep copy, not a shallow copy).

The program then sorts list1 using bubble sort, list2 using selection sort, and list3 using insertion sort and outputs the total number of comparisons made by each sorting algorithm.

Provide the code project that contains your solution and output. BUT ALSO, submit a statement (type it below) that addresses how the results align with the expected performance (in terms of the Big O classification for these algorithms). Don't just tell me what their Big O complexity is, also tell me how that complexity was born out by your results.

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 Databases Questions!