Question: How can I code a Merge sort in Java and then use System.nanoTime() to sort double arrays of user input array size x and number

How can I code a Merge sort in Java and then use System.nanoTime() to sort double arrays of user input array size x and number of arrays y?

IE, user input could be x = 400 and y = 500 and that would run 500 double arrays of size 400 (filled with randomly generated numbers) through the merge sort and the return would be the runtime average per sorted array. (total time/number of arrays)

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!