Re: Non-recursive chop and clone for Binary Search Tree - Solutions
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Sat, 24 Nov 2007 02:15:30 -0500
"jehugaleahsa@xxxxxxxxx" wrote:
.... snip ...
At the time, I wasn't in the mood; however, I was recently REQUIRED
to figure it out. The problem: I had an unbalanced tree that needed
destroyed. You can usually get away with a recursive (naive/trivial)
implementation, but you're leaving yourself open for a stack overflow
at some point down the line.
Look up red/black trees and AVR trees. They both build trees with
approximate balance.
--
Chuck F (cbfalconer at maineline dot net)
<http://cbfalconer.home.att.net>
Try the download section.
--
Posted via a free Usenet account from http://www.teranews.com
.
- Follow-Ups:
- Re: Non-recursive chop and clone for Binary Search Tree - Solutions
- From: Richard Heathfield
- Re: Non-recursive chop and clone for Binary Search Tree - Solutions
- References:
- Non-recursive chop and clone for Binary Search Tree - Solutions
- From: jehugaleahsa@xxxxxxxxx
- Non-recursive chop and clone for Binary Search Tree - Solutions
- Prev by Date: Re: Non-recursive chop and clone for Binary Search Tree - Solutions
- Next by Date: Re: Non-recursive chop and clone for Binary Search Tree - Solutions
- Previous by thread: Re: Non-recursive chop and clone for Binary Search Tree - Solutions
- Next by thread: Re: Non-recursive chop and clone for Binary Search Tree - Solutions
- Index(es):
Relevant Pages
|