home *** CD-ROM | disk | FTP | other *** search
Wrap
Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!mips!swrinde!zaphod.mps.ohio-state.edu!caen!news.cs.indiana.edu!umn.edu!ulysses.cs.umn.edu!kencham From: kencham@ulysses.cs.umn.edu (Deepak) Newsgroups: comp.lang.c Subject: Re: Balancing Binary Search Trees Message-ID: <1992Jul30.223041.3092@news2.cis.umn.edu> Date: 30 Jul 92 22:30:41 GMT References: <1992Jul29.014821.2675@samba.oit.unc.edu> <29JUL199223244481@venus.tamu.edu> Sender: news@news2.cis.umn.edu (Usenet News Administration) Distribution: usa Organization: University of Minnesota Lines: 12 Nntp-Posting-Host: ulysses.cs.umn.edu Try using a Red-Black tree - they maintain the height of the binary tree balanced with a constant overhead. Cormen et. al. has a good discussion on the matter. Hope that helps. Deepak -- ******************************************************************************** * Deepak R. Kenchammana-Hosekote ******* ****** * * Dept. of CSci, University of Minnesota *** *** *** *** * * 1:((612) 626-8396(o),(612) 339-8997(r)) *** ***** *** * * kencham@ulysses.cs.umn.edu ***** ***** * ********************************************************************************