Question: I need help with this function I am struggling to work out the algorithm. Please implement the sort function in O(n log n). do not

I need help with this function I am struggling to work out the algorithm. Please implement the sort function in O(n log n). do not use any other helper methods I only need help with the implementation inside the function private static int sort(int[] capacity, int k) { // Implement me! return -1; }
* * * import java.io.*; import java.util.*; public class heap { /** WD memory makes hard drives. A drive with capacity is used for the first tme. It creates an new drive with capacity c/2. You were able to obtain n such drives with diffrent capacitites. You can only use k of them at once. implement an algorithm that determines in O(nlog n) time as the maximum capacity you can use. */ private static int sort(int[] capacity, int k) { // Implement me! return -1; } *
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
