Question: Lab 5 - Sorting Algorithms Create a Java Project and implement the necessary Java classes in the same package. 1. For this lab assignment, you

Lab 5 - Sorting Algorithms Create a Java Project and implement the necessary Java classes in the same package. 1. For this lab assignment, you need to implement a Mergesort algorithm on an ArrayList of integer values. You need to implement two classes, Main and Sorting. Sort a list of 100 numbers using the algorithm. You can generate them by using java.util.Random library. After generation, you will use your newly implemented Mergesort algorithm to sort the numbers. (50 pts) 2. Now, you need to use Collections.sort () method to sort the same elements. (10 pts) 3. Compare the execution time of your implementation with the method that is implemented by Java. How much is this time difference if there is one? If there is not a recognizable time difference between these methods, what do you think about the reason of it? (40 pts)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
