Question: 1.Write a code in java for merge sort that does not use recursive calls to any functions. Instead, it just uses loops. 2.The input for

1.Write a code in java for merge sort that does not use recursive calls to any functions. Instead, it just uses loops.

2.The input for the program comes from a text file called input.txt and the output will be written to output.txt.

3. The input.txt will contain several lines of numbers where each line will have integers separated by spaces as unsorted lists. Each line must be sorted separately by your algorithm. So the algorithm is called repeatedly (not recursively) for each line in the input.txt. Use Scanner inFile = new Scanner(new FileReader("input.txt"));.

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!