3.5. Quiz
Quiz 3: Sorting Algorithms
Coding
Shell Sort: Hibbard
Create the
ShellSortQuizclass under thesort.comparisonpackage that inheritsShellSort.Override the
populateSequence()andgetSequenceStartIndex()methods such that it performs Shell Sort by using the Hibbard sequence: .Feel free to use the code in
ShellSortKnuth.
Radix Sort: MSD
Create the
RadixSortQuizclass under thesort.distributionpackage that inheritsRadixSort.Override the
sort()method such that it performs Radix Sort from the most significant digit (MSD) to the least significant digit (LSD).Feel free to use the code in
sort.distribution.
Testing
Create the
SortQuizTestclass under the testsortpackage.Test the correctness of your
TernaryHeapQuizusing thetestRobustness()method.Add more tests for a more thorough assessment if necessary.
Benchmarking
Compare runtime speeds between
ShellSortKnuthandShellSortQuizfor random, ascending, and descending cases using thetestRuntime()method.Compare runtime speeds between
LSDRadixSortandRadixSortQuizfor random cases.Create a PDF file quiz3.pdf and write a report that includes charts and explanations to compare runtime speeds between:
ShellSortKnuthandShellSortQuiz.LSDRadixSortandRadixSortQuiz.
Submission
Push everything under the sort package to your GitHub repository:
Submit quiz3.pdf to Canvas.
Last updated
Was this helpful?