CSC 172
Homework 4

Assigned Nov 28, due Dec 14

The main goal of this assignment is to have you write a binary search and two or more different sorting algorithms (e.g. insertion, selection, merge, quick, tree). I've already given you a recursive insertion sort on polymorphic linked lists, so I'll be more impressed if you do something different: one of the other algorithms, or insertion sort using loops rather than recursion, or something like that. In any case, you may achieve this goal by incorporating "sort" and "search" capabilities into your address book, or you may do it as a separate program that simply generates a large random list, sorts it, and searches for elements in it using a binary-search algorithm.

As usual, while you work on this program, keep an error log recording mistakes you make. For each one, write down

  1. symptoms, or how you discovered that something was wrong;
  2. diagnosis, or what you had done wrong to cause the problem;
  3. treatment, or how you fixed it; and
  4. prevention, or what you might do in the future to avoid making the same mistake again. (If all you have to say here is "be more careful," don't bother.)
You may do this using the PSP forms, or (if you prefer) a plain text file or on paper.


Last modified:
Stephen Bloch / sbloch@adelphi.edu