



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Jared Saia University of New Mexico
Hash Tables implement the Dictionary ADT, namely:
Red-Black trees (a kind of binary tree) also implement the Dic- tionary ADT, namely:
Tree-Search(x,k){ if (x=nil) or (k = key(x)){ return x; } if (k<key(x)){ return Tree-Search(left(x),k); }else{ return Tree-Search(right(x),k); } }
Tree-Successor(x){ if (right(x) != null){ return Tree-Minimum(right(x)); } y = parent(x); while (y!=null and x=right(y)){ x = y; y = parent(y); } return y; }
Insert(T,x)
Case 3: The node, x to be deleted has two children