Computer Science 261
Exam 3 Review
The third hour exam will be given on Friday, Oct. 12, to Tuesday,
Oct. 16, and will cover chapters 7 - 8 of Budd together with class
notes and material on asymptotic behavior in earlier assigned reading
in Budd (particularly chapter 4).
Questions on sorting algorithms on this exam will be limited to
the O(n^2) sorts discussed in class, and illustrated in the example
program (VariousSorts) in the handouts folder.
Usual caveat s apply.
- Be able to define formally and informally what it means to say
that a function f is O(g).
- Be able to say what a cost function is, and to derive one in a
simple case.
- Know the basic functions (log(n), n, n*log(n), n^2, n^3, ...,
2^n), their order, and be able to recognize them (chapter 4 has
some graphs).
- Be able to list, insert, and delete in a simple linked list of
Strings. Be able to describe what is going on, particularly with
respect to object references. What is the role of null?
- Be able to write
- A bubble sort
- A selection sort
- An insertion sort
- For each of these, be able to give loop invariants as
appropriate and say why these are O(b^2) sorts.
- QuickSort and ShellSort will be on the next exam. You may want
to review the video "sorting out sorting" at that time.
Any questions? Please ask!