Summary: Written 3 Page 1
CS 2420 Written 3
1. Show the result of inserting 10 into the top-down splay tree shown below. (HINT: You can test
your answer by going to CS3/Splay Trees. You may find it difficult to create specific tree, as any
operation changes the existing tree. Try the following to create a specific tree.
Delete All and then click Insert Binary Tree for each node to insert nodes by level (and not have
splaying done). Once you get the tree build, Insert will insert using splay tree operations.)
2. Show the result of deteteMax from the top-down splay tree show below:
Written 3 Page 2
3. For the B+-tree below (with L=5 and M=5), show the tree after inserting 60, 61, 62, 100.
4. For the B+-tree below (with L=5 and M=5), show the tree after deleting 98, 85, 83,49, 50.
5. The definitions of primary and secondary clustering are sometimes difficult to get straight.
In primary clustering, not only do items collide because they hash to the same location, but one
item may collide with the alternate location for another. This occurs in linear probing. When the
item that hashes to x is placed in y, items that hash to either x or y both try the same next location.
As an analogy, suppose I have one candy bar of each type and am trying to give everyone their first
choice. Suppose two people want a Babe Ruth, obviously someone will have to go with second
choice. But what if the second person preferring a Babe Ruth got a KitKat (which was someone
else's favorite candy bar). So the person who wanted a KitKat has to take a Milky Way. Our