Question: CSC 1351-02, Spring 2021, Lab 5 Name this project SortTimer3 Create a class SortTimers with the following Methods : 1. public static void selectionSort(int[] nus)

![selectionSort(int[] nus) This method uses the selection sort to sort an array](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/10/670400f693bf5_638670400f635bda.jpg)

CSC 1351-02, Spring 2021, Lab 5 Name this project SortTimer3 Create a class SortTimers with the following Methods : 1. public static void selectionSort(int[] nus) This method uses the selection sort to sort an array of integers, named nums, into increasing order. 2. public static void selectionSort Print (int[] nums) Create this method by copying and pasting the selectionSort method in Step 1 above and then adding the statement: System.out.println("nums -" + Arrays.toString (nums)); at the end of the first for loop (right before the that ends the first for loop). 3. public static void insertionsort (int[] nums) This method uses the insertion sort to sort an array of integers, named nums, into increasing order. 4. public static void insertionSortPrint (int[] nums) Create this method by copying and pasting the insertionSort method in Step 3 above and then adding the statement: System.out.println("nums -" + Arrays.toString (nums); at the end of the first for loop (right before the ) that ends the first for loop). 5. public static void mergesort (int[] nums, int left, int right) This method sorts the subarray nums[left. . right of the nums array into increasing order using the merge sort algorithm. Use the following pseudocode for this method: If left mid+1), then 11 (m Smid) copy the remainder of nums[left..mid] into the result array, otherwise copy the remainder of nums (mid+1..right) into the result array. Then copy the result array to the subarray nums left..right) of the nums array. 6. public static void mergeSortPrint(int[] nums, int left, int right) Create this method by copying and pasting the mergeSort method in Step 5 above and then adding the statement : System.out.println("nums = " + Arrays.toString (nums)); at the end of the method (right before the) at the end of method). 7. public static void quickSort(int[] nums, int left, int right) This method sorts the subarray nums (left..right] of the nums array into increasing order using the quick sort algorithm. Use the following pseudocode for this method: If left = pivot c2. Keep on decrementing until nums [d]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
