CSCI 256
|
Only turn in problems from the second section.
Draw the skip list that results from performing the following sequence of operations on the skip list shown in Figure 3.42 of the skip list handout (taken from "Algorithm Engineering" by Goodrich and Tamassia): removeElement(38), insertItem(48,x), insertItem(24,y), removeelement(55). Assume the coin flips for the first insertion yield two heads followed by tails, while the coin flip for the second insertion yields tails. Note that insertItem(k,val) inserts the value "val" into the dictionary, using k as the key.
Problem 27.2-1 on page 599 of the text.
Give a pseudo-code description of the removeElement dictionary operation, assuming the dictionary is implemented by a skip-list structure.
Problem 27.1-6 on page 586 of the text.
Back to:
kim@cs.williams.edu