[prev] 128 [next]

Application of BSTs: Sets (cont)

Concrete representation:

#include "BSTree.h"

typedef struct SetRep {
   int   nelems;
   Tree  root;
} SetRep;

typedef SetRep *Set;

[Diagram:Pic/set-tree.png]