Question: Write a C++ code the does the following: Implement the merge sort, the quick sort, bubble sort, and the insertion sort. For simplicity, you just
Write a C++ code the does the following:
- Implement the merge sort, the quick sort, bubble sort, and the insertion sort. For simplicity, you just need to consider sorting integers within a fixed size array.
- Study the effect of the initial array size, the initial ordering of the numbers within the array on the number of comparisons and the exchanges needed for each array.
- Make sure to run the same array with the same values through all different algorithms for fair comparison.
- Present your findings in a way that will allow you to draw some conclusion as related to the corner cases that will impact the performance of these different algorithms.
You should submit your C++ source code along with screen shots of sample runs that showed successful runs for the above steps.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
