Midterm Exam Topics Topic Text Chapter -------------------- ------------- Algorithmic Pseudo-code........... 2 Rate of Growth of Functions and Asymptotic Notation........... 3 Recurrences....................... 4 The substitution method......... 4.1 The recursion-tree method....... 4.2 The master method............... 4.3 Sorting Algorithms Insertion-sort.................. 2 Merge-sort...................... 2 Heap-sort....................... 6.1-6.4 Quicksort....................... 7 Quicksort and Partition....... 7.1 Quicksort performance......... 7.2 Randomized Quicksort.......... 7.3 Sorting in Linear Time.......... 8 Lower bounds for sorting...... 8.1 Counting sort................. 8.2 Radix sort.................... 8.3 Bucket sort................... 8.4 Dynamic sets Priority Queue Implementations Binary Heaps.................. 6.5 Insert Extract-Min Elementary Data Structures...... 10 Stacks and Queues............. 10.1 Linked Lists.................. 10.2 Implementing Pointers & Objs.. 10.3 Representing Rooted Trees..... 10.4 Hash Tables..................... 11 Direct-address tables......... 11.1 Hash Tables................... 11.2 Collision Resolution Chaining Open Addressing........... 11.4 Binary Search Trees............. 12.1-12.3 Tree-Walk Search Insert Delete Minimum Successor Red-Black Trees................. 13 Red-Black Properties.......... 13.1 Rotations..................... 13.2 Insertion (and Fixup)......... 13.3 Deletion (and Fixup).......... 13.4 Possible Types of Exam Problems: (1) Writing Pseudocode (2) Runtime analysis of algorithms (3) You should be able to trace the algorithms and operations on the data structures that we have discussed. (4) Short answer (5) "Prove that ..." Especially questions from the Exercises and Problems in the Assignments. Materials allowed at exam: One 4"x6" note card (or equivalent) The following list contains examples of the kinds of questions listed above. The following is a list of Exercises and Problems from the text. Questions like these will appear on exams (in a slightly altered form). If they fall into one of the categories above, that is noted; the ones that have appeared in class assignments are marked with *'s. Page 13 Exercises: 1.2-2 (4) (but easier to calculate) 1.2-3 (4)* (but easier to calculate) Problems: 1-1 (first column) (4)* Pages 20-21 Exercises: 2.1-1 (3) 2.1-2 (1) 2.1-3 (1,5) Page 27 Exercises: 2.2-3 (2) Pages 36-37 Exercises: 2.3-2 (1)* 2.3-5 (2)* Page 50 Exercises: 3.1-4 (5)* 3.1-5 (5)* Page 57 Exercises: 3.2-3 (5)* 3.2-7 (5)* Pages 57-58 Problems: 3-1 parts a., b., and c. (5)* Page 67 Exercises: 4.1-1 (5) Page 75 Exercises: 4.3-1 (4) 4.3-3 (5) Pages 129-130 Exercises: 6.1-1 (4) 6.1-2 (5)* 6.1-5 (4) 6.1-6 (4) Page 135 Exercises: 6.3-1 (3) 6.3-2 (4) 6.3-3 (5)* (too hard for exam) Pages 136,138 Exercises: 6.4-1 (3) Pages 140-142 Exercises: 6.5-1 (3) 6.5-2 (3) 6.5-3 (1)* (In Part 1, Assignment 4) Page 148 Exercises: 7.1-1 (3) Page 153 Exercises: 7.2-1 (5) 7.2-2 (2) 7.2-3 (5) 7.2-4 (5) Page 153 Exercises: 7.4-2 (2)* (too hard for exams) 7.4-4 (2)* (too hard for exams) Pages 167-168 Exercises: 8.1-1 (4) 8.1-2 (5) (in Ex. 3.2-3 above) Pages 167-168 Exercises: 8.3-1 (3) Page 177 Exercises: 8.4-1 (3) Pages 208-209 Exercises: 10.2-1 (4) 10.2-2 (5) 10.2-3 (5) Pages 216-217 Exercises: 10.4-4 (4) Pages 228-229 Exercises: 11.2-2 (3) Pages 244-245 Exercises: 11.4-1 (3) 11.4-2 (1) Page 256 Exercises: 12.1-1 (4) 12.1-2 (4) 12.1-4 (1) 12.1-5 (5)* Pages 259-260 Exercises: 12.2-1 (4) 12.2-2 (1)* 12.2-3 (1)* 12.2-5 (5)* Trace BST insertion/deletion (3) Pages 276-277 Exercises: 13.1-2 (3,4) 13.1-4 (4)* 13.1-5 (5)* 13.1-6 (4)* 13.1-7 (4) Pages 278-279 Exercises: 13.2-1 (1)* (In Assignment 7, Part 1) Page 287 Exercises: 13.3-1 (4) 13.3-2 (3) (trace RB-tree insertion)* 13.3-3 (4) Pages 293-294 Exercises: 13.4-3 (3) (like Assignment 4, last problem) 13.4-5 (4)