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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started