CPSC 220
Fall 2007
HW 4: Quicksort

  1. Read the section on Quicksort in the text (p. 351). Now consider the array a of integers below:
    5  9  2  3  5  4  7  3  1  8  6  5  
    
    Assuming you have called quickSort(a, 0, 11), using the quickSort method as written on page 352, show the following:

  2. Write a Java program to implement Quicksort. You may refer to the code in L&C (it's all there) or any of your own old code, but you may not use significant portions of anyone else's code. Your program should have the following behaviors:

    Your program should be self-contained, that is, it should not rely on any other classes that are not in the standard Java library. E-mail your source code to me before class.