A good way to prepare for an exam is to solve old exam questions. Here are some old exams and additional practice questions. Here is some midterm exam information. Here is some final exam information.
Be warned that old courses might have covered different material and used different policies for exams. For example, at least the following were changed in Spring 2009: quicksort uses the first element as the partition element; shellsort uses a different increment sequence; red-black BSTs are left-leaning 2-3 trees; KMP and grep implementations are completely different; and LZW uses a different starting code.
Exam policy. Exams are closed book and closed note, although you are permitted to bring one 8.5-by-11 cheatsheet (one side for the midterm and both sides for the final), written in your own handwriting. No calculators or computational aids are permitted.