
CPSC 212-301 Name: _____________________________
Test #2B October 23, 2006
Honor Pledge:
I pledge that I have neither given nor received unauthorized assistance on this test.
Signed: _______________________ Date: _____________
Closed books. Closed Notes. Calculators OK. 85 points. 60 minutes. Weight of each question in
parentheses. Please use a pencil. For more space, use the back of the sheet.
1. (10) Your friend does not believe that an algorithm that sorts records by comparing keys (sorting by
comparison) can have at best O(N log N) complexity. How would you convince him of this fact?
2. (10) Insert the following values into a B-Tree with M=3 and L=4. Ignore duplicates.
24 29 15 61 27 19 5 7 25 36 4 23 34 72 98 43 16
3. (5) Give a complete and precise definition of a red-black tree.