Skip to content

Comparison based Sort

Jinho D. Choi edited this page Sep 6, 2017 · 15 revisions

Reading

Exercise

Quiz

  • Create classes ShellSortPratt and ShellSortHibbard under sort.comparison extending ShellSort.
  • ShellSortPratt and ShellSortHibbard must use the Pratt and Hibbard sequences, respectively. Feel free to use the code in ShellSortKnuth:
  • Pratt: successive numbers of the form 2p3q (1, 2, 3, 4, 6, 8, 9, 12, ...)
  • Hibbard: 2k - 1 (1, 3, 7, 15, 31, 63, ...)
  • Run the unit test and make sure your sorting algorithms perform accurately.
  • Compare the speed between ShellSortPratt, ShellSortHibbard, and ShellSortKnuth using the unit test. Write a report about the speed comparison and save it as quiz2.pdf.
  • Submit ShellSortPratt.java, ShellSortHibbard.java, and quiz2.pdf: https://canvas.emory.edu/courses/32845/assignments/75152

CS323: Data Structures and Algorithms

Instructor


Emory University

Clone this wiki locally