Question: Please do and explain this in Java: (REMINDER: Please send me the complete code of the whole Part1 and Part 2!!!) and are the two

Please do and explain this in Java: (REMINDER: Please send me the complete code of the whole Part1 and Part 2!!!)

Please do and explain this in Java: (REMINDER: Please send me thecomplete code of the whole Part1 and Part 2!!!) and are thetwo popular sorting methods in Java; behind the scene, both implements andwhich has an average runtime of For this lab, you are notallowed to use these two functions. Violation will deduct half of yourimplementation grade(-37.5\%). You need to implement a custom sorting function that cantake in any date type and sort them(Generic type). Your will use

and are the two popular sorting methods in Java; behind the scene, both implements and which has an average runtime of For this lab, you are not allowed to use these two functions. Violation will deduct half of your implementation grade(-37.5\%). You need to implement a custom sorting function that can take in any date type and sort them(Generic type). Your will use for the sorting portion of the lab Part 1: - Follow the pseudocode and instructions in the starter code, complete the logics for the function. The is slightly different from the class slides, it uses But the main logic is the same. Part 2: - Given an unsorted array of distinct integers , sort the array by using quick sort from Part 1, then find all nairs of elements with the minimum absolute difference of any two ele - Return a list of pairs in ascending order(with respect to pairs), each pair follows: from , and equals to the minimum absolute difference of any two elements in Examples Input: arr =[5,4,2,1,3] Output: [[1,2],[2,3],[3,4],[4,5]] Explanation: The minimum absolute difference is 1. List all pairs with difference equal to 1 in ascending order. Input: arr =[1,3,6,10,15] Output: [[1,3]] Explanation: The minimum absolute difference is 2. Input: arr =[4,8,12,21,17,1,16,25] Output: [[16,12],[4,8],[17,21],[21,25]] Explanation: The minimum absolute difference is 4. Requirements - You must submit a single Java file containing the class named Lab04. Your class must contain the functions with the following headers: public static List minimumAbsDifference(int[] arr) - You must also complete your sorting functionality and include all related functions. public static > void sort (T[] unsorted) public static void quickSort(T[] unsorted, int left, int right) public static T> void swap(T[] arr, int i, int j ) - All necessary helper functions are provided in the starter code. If you are stuck, check the hints in the comments, or ask for help. Clear and finish all the in the lab

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!