BST API Simplified
template <typename T, class P = TLessThan<T> >
class BSTLite
{
...
public:
T& Get (const T& t); // "associative array" semantics
void Put (const T& t); // unimodal insert
bool Retrieve (T& t) const; // if found sets t to result
...
// proper type
BST ();
explicit BST (const P&); // specify predicate object
BST (const BST&);
virtual ~BST ();
BST& operator= (const BST&);
};
- Very useful
- Iterator free!