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[]](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66e312d4ebcc4_52466e312d49c848.jpg)
![list) { int arr[][] = {{1,2},{3,4}}; return arr; } } PLEASE USE](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66e312d58f590_52566e312d528196.jpg)
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
Get step-by-step solutions from verified subject matter experts
