Question: Write a C++ program that implements the bubble sort and the count sort algorithm for arrays of integers. Test the implementations on small arrays, printing

Write a C++ program that implements the bubble sort and the count sort algorithm for arrays of integers. Test the implementations on small arrays, printing out the results, to make sure the algorithms work. Create five arrays that can hold 2000, 20000, 200000, and 200000 integers. Populate the arrays with random numbers between 0 and 2000. Call the bubble sort algorithm on each array, then repeat the same process but sort using the count sort instead of bubble.

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!