Question: sortAlg.java This class defines a sorting algorithm optimized for randomly generated arrays. Implement the sorting algorithm that you think is optimal here. It is used
sortAlg.java
This class defines a sorting algorithm optimized for randomly generated arrays.
Implement the sorting algorithm that you think is optimal here. It is used by the
randMatrix class. It contains only two methods, a sortA method recursively sorts an
array, and a helper method to perform any external functions the algorithm may need.
These methods are static, so they do not require an instance of this class to be created.
Bonus prohint: If you want to you can implement different sorting algorithms and
calculate the exact runtime using System.nanoTime you could test a few input
values of n to average runtime.
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
