[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] rbtrees [was Re: AVL trees vs. Red-Black trees]
On Tue, 30 Nov 1999, Kevin O'Connor wrote:
>[..] I've got inserts working, but
>removes are becoming a myriad of special cases..
removes are trivial with rbtrees as you never need to compare nodes. All
the rebalancing is done in function of the node color (that is a private
information of each node). The same is true also for the
insert-rebalancing, but to do an insert you must first browse the tree to
do a normal ordered O(log(n)) insert before calling the rebalance (thus a
compare semantic on elements is necessary for the insert operation to
work).
Andrea
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/