Question: Total = 1 0 marks NOTE: a ) You must follow these instructions. You should submit two files, 1 ) java file ( your code
Total marks
NOTE:
a You must follow these instructions. You should submit two files, java file your code and
screenshot of the plotgraph
b you must work in group of max group size students.
Write a Java program that compares standard MergeSort with the Hybrid MergeSort MergeSort with
InsertionSort for smaller arrays You need to do the following:
Create an integer array as big as your JavaRAM allows you. That is create the largest array
possible in your computer.
Fill this array using Random integer values, use Java Random number generator.
Implement Hybrid MergeSort that uses InsertionSort when the array gets smaller than some
size, say s
Run Hybrid MergeSort for various values of and calculate the time it takes for the algorithm
to finish.
Plot a graph where axis has the value of and axis has the time it took to finish sorting.
Note that you should run various values of evenly spaced from to Here is the size of
the entire array. Note also that when it represents pure MergeSort, and when it
represents pure InsertionSort.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
