COS 111, Fall 1998 - Problem Set 7

Due by 5pm, Tuesday Nov. 24

Problem 1
Brookshear, Chapter Four Review Problem 36 (pg 180)

Problem 2
Execute the Quicksort algorithm (given on page 167 of Brookshear) on the list of 8 items given below. Indicate the pivot element and show the revised list each time an exchange is made. Do the same for each recursive execution of Quicksort made during the sorting process. Be sure to explicitly give the list with which each recursive execution starts. (A recursive execution of a procedure is an execution (i.e. application) that is requested during a different execution of the same procedure -- with different values for the parameters.)

List:
  1. Edith
  2. Bob
  3. Garth
  4. Helen
  5. Frank
  6. Carol
  7. Dean
  8. Abby

Problem 3
Brookshear, Chapter Five Review Problem 7 (pg 228).


Back to Schedule and Assignments