Opus5.Demo9
Explanation
This demonstration program tests the following classes:
StraightInsertionSorter,
BinaryInsertionSorter,
StraightSelectionSorter,
BubbleSorter,
HeapSorter,
MedianOfThreeQuickSorter,
TwoWayMergeSorter,
BucketSorter, and
RadixSorter.
The source code for the main method is available
here.
Instructions
This is a non-interactive program
that creates an array of 100 random integers
and then sorts that array using the various sorters listed above.
The output consists of the name of the sorter,
the length of the array,
the value used to seed the random number generator,
and the time taken by the sorter (in seconds).
Copyright © 1999 by
Bruno R. Preiss, P.Eng. All rights reserved.