Question: Modify the MergeSort program to support searching arrays. Note: The user would give an unsorted list of words as command-line arguments along with the starting

Modify the MergeSort program to support searching arrays.
Note: The user would give an unsorted list of words as command-line arguments along with the starting and ending index of the sub array that should be sorted. The program should print out a list where the strings between the given indexes are sorted alphabetically.
Sample runs:
>java Merge 2 4 toy apply sand bay cat dog fish
toy apply bay cat sand dog fish
 Modify the MergeSort program to support searching arrays. Note: The user

Program 4.2.6 Mergesort public class Merge public static void sort(ComparableC] a) Comparable[] aux - new Comparable[a.length]; sort(a, aux, 0, a.length); private static void sort(Comparable[] a, Comparabletl aux, int lo, int hi) // Sort a[lo, hi). allo, hi) subar if (hi-10

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!