Question: JAVA: need help coming up with a code Merge sort is very efficient for working with large arrays but is not as efficient as Bubble

JAVA: need help coming up with a code

Merge sort is very efficient for working with large arrays but is not as efficient as Bubble sort when working with smaller arrays. In the class RecStuff write a modified form of merge sort (for ints) that will invoke a bubble sort if the current array size being worked with is less than 80. If the size is over 80 continue with the regular Merge sort code. Include all required methods in the class RecStuff. Test your modified merge sort on random int arrays of size 10,000, 100,000 and 1,000,000 using System.nanotime to estimate execution times. Does the new merge sort seem to be more efficient? Place your observations in the Javadoc header for your modified mergeSort.

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!