Delete(list, searchKey) local update[1..MaxLevel] x := list→header for i := list→level downto 1 do while x→forward[i]→key < searchKey do x := x→forward[i] update[i] := x x := x→forward if x→key = searchKey then for i := 1 to list→level do if update[i]→forward[i] ≠ x then break update[i]→forward[i] := x→forward[i] free(x) while list→level > 1 and list→header→forward[list→level] = NIL do list→level := list→level – 1
Zobacz też lista struktura danych
Literatura dodatkowa William Pugh, A Skip List Cookbook, 1989. William Pugh, Skip lists: a probabilistic alternative to balanced trees, Communications of the ACM 33, 1990.
Kategoria:Struktury danych