| | | | | |

Associative Array API

// mutators
D&   Get (const KeyType& k); // insert key if not found

void Put (const KeyType& k , const DataType& d) { Get(k) = d; }

void Erase(const KeyType& k); // same as Table
void Clear();                 // same as Table
void Rehash();                // see slide +2

// data retrieval
bool     Retrieve    (const KeyType& key, DataType& data) const;

// size operations
bool     Empty       ()   const;
size_t   Size        ()   const;

// AA bracket operator
DataType& operator [] (const KeyType& k)        { return Get(k); }

// Plus : Constructor, Destructor, Copy Constructor, Assignment Operator
// Optional: Iterators, which facilitate Includes, LowerBound, UpperBound, ==, != 

| | Top of Page | 12. Binary Search Trees - 39 of 41