In this assignment you will compare the real-time performance of the built-in sort function in the STL and your implementation of the bubble sort algorithm. First, generate an array of 1000 random numbers from 1 to 10000. Sort the array with your bubble sort function and time the sort. Then generate a new set of 1000 numbers and sort using the STL sort function, timing its performance. What are the differences in times to sort? Now increase the array size to 10000 and time both sorts. What are the differences? Now increase the array size to 100000, sort both ways, and compare. At what point did the two algorithms begin to diverge in time to sort? If they hadn't diverged by 100000 elements, continue increasing the size of the array until the two sorts do diverge and report on the size of the array and compare the sorting times. // C++ Please!!!
In this assignment you will compare the real-time performance of the built-in sort function in the STL and your implementation of the bubble sort
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 4 images