Question: Starter Code:- import java.util.*; public class Solution { public int[][] sort(int[] list) { int arr[][] = {{1,2},{3,4}}; return arr; } } PLEASE USE STARTER CODE

 Starter Code:- import java.util.*; public class Solution { public int[][] sort(int[]list) { int arr[][] = {{1,2},{3,4}}; return arr; } } PLEASE USE

Starter Code:-

import java.util.*;

public class Solution {

public int[][] sort(int[] list) {

int arr[][] = {{1,2},{3,4}};

return arr;

}

}

PLEASE USE STARTER CODE TO SOLVE USE JAVA DONT COPY FROM OTHERS ITS NOT USING STARTER CODE PLEASE DONT SPAM OR I WILL DISLIKE

Please use merge sort to sort the array L ascendingly and decreasingly, output the final result. (Sort and reverse sort the given input array using merge sort) Example 1: Input: L=12,11,13,6,5; Output: [[5,6,11,12,13],[13,12,11,6,5]] Example 2: Input: L=432,432,21,2,31,25,61 Output: [[2, 21, 25, 31, 61, 432, 432], [432, 432, 61, 31, 25, 21, 2]] Example 3 : Input: L=250,343,137,789,551,954 Output: [[137, 250, 343, 551, 789, 954], [954, 789, 551, 343, 250, 137]] Example 4: Input: L=61,61,21,2,61,25,61 Output: [[2, 21, 25, 61, 61, 61, 61], [61,61, 61, 61, 25, 21, 2]]

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!