Implement both the MergeSort
and QuickSort classes.
These classes must be named MergeSort and
QuickSort respectively.
The classes in the text book use arrays,
your implementations should work with Vector's
instead. Also, please note that some of the methods have changed names from the way they were in the
text book.
For your implementation of QuickSort, you must have three different ways of choosing
the pivot as specified by the PivotType enum
which will be defined in QuickSort.
Your driver program should sort the following types of Vectors using both sort algorithms. In
the case of QuickSort you should sort the Vectors with all three methods of
selecting the pivot.
Integers.
Integers.
Integers.
Integers.
Integers followed by 1,000 random Integers.
Please make sure that all your Java programs are in the default package.
Please compress the Java programs as a zip file containing:
Please submit your zip file at the
Mimir Platform Website
.