On (28 May 97) Don Guy wrote to Neil Burrows...
DG> void QuotedReply( Neil: recipient )
Obviously an ex-Pascalian. That should of course be:
void QuotedReply(repipient_t Neil)
or perhaps:
void QuotedReply(RECIPIENT Neil)
depending you the conventions you happen to prefer.
NB> But not balancing it would have a worst case scenario of
NB> basically having a linked list! This would kinda defeat
NB> the Binary Tree idea. :)
DG> Ugh. Good point.
Yes, but empirical studies show that this is typically quite unusual.
DG> This is close to what I was thinking: re-balancing the tree after the
DG> addition of each new node == mucho overhead.
Quite true - keeping a tree perfectly balanced is generally believed to
be impratical. Using an AVL or red-black tree, you typically do some
rebalancing about every three insertions or deletions, but the balancing
you do is limited to being logarithmic rather than linear.
Later,
Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)
|