Question: Problem Statement You will write two programs to sort arrays of strings. One version will implement the QuickSort, the other will implement MergeSort. You must

Problem Statement You will write two programs to sort arrays of strings. One version will implement the QuickSort, the other will implement MergeSort.

You must use basic sequential arrays in your programming language (no library data structures such as ArrayList or Vector). You must also your own sort code. Do not use any built-in libraries for sorting. (Example: in C++, the declaration may look like string lines [N]; )

You may write the solution to this assignment in either Java or C++.

Requirements

Prompt the user for the name of the input and output text files.

Read the lines of the file into an array of strings. Your program should work for any number of lines in a file, from 1 through 200000 (two hundred thousand lines, at least).

Sort the lines using Quicksort. The string comparisons should be case-insensitive. Sort the original set of data using Mergesort.

Include metric gathering instructions to measure the elapsed time for each sort. Are they the same?

I have some of the first parts for the file bits, but my code is an absolute disaster! I need some direction :') (Oh I am using JAVA btw)

If you can add an explanation to some of the parts, that would be great. I just really want to understand the program before I go to revise it!

Also, advice is welcomed as well

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 Programming Questions!