Skip to main content
Lesson 26 - Quicksort
Lesson MenuPrevious
  
L.A.26.1 - Quicksort page 6 of 6

Assignment:

  1. Type in the quickSort method as a separate file and save it to disk.

  2. Cut and paste the quickSort algorithm into your sorting template program and count the number of steps needed for quickSort. Record the number of steps in Lab Exercise, L.A.23.1, Quadratics from Lesson 23.

  3. Graph the number of steps of the three quadratic sorts (bubble, selection, insertion) and the recursive mergesort and quicksort on the same piece of graph paper. Plot number of steps on the vertical axis and number of data elements on the horizontal axis. It will be difficult to graph the more efficient algorithms as the number of steps are so much smaller than the quadratic algorithms. Make an estimate of where the data points occur for recursive mergesort and quicksort.

Instructions:

  1. Submit the lab exercise, L.A.23.1, Quadratics, with your graph.


Lesson MenuPrevious
Contact
 ©ICT 2003, All Rights Reserved.