TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: DON GUY
from: JERRY COFFIN
date: 1997-05-28 23:35:00
subject: Binary Search Tree

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.