Implement both the MergeSort
and QuickSort classes.
These classes must be named MergeSort and
QuickSort respectively.
The classes in the text book use array
s,
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 Vector
s using both sort algorithms. In
the case of QuickSort
you should sort the Vector
s with all three methods of
selecting the pivot.
Integer
s.
Integer
s.
Integer
s.
Integer
s.
Integer
s followed by 1,000 random Integer
s.
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
.