Re: A tree data structure?
Re: A tree data structure?
- Subject: Re: A tree data structure?
- From: WT <email@hidden>
- Date: Tue, 5 May 2009 19:19:04 +0200
On May 5, 2009, at 5:52 PM, Graham Cox wrote:
On 06/05/2009, at 1:28 AM, Andreas Grosam wrote:
Please don't underestimate the effort to "just roll your own".
Nor overestimate it ;-)
Bear in mind that a simple tree can be implemented using multiple
instances of just one small object, the node itself. Usually that's
all you have to code and it's all self-referential.
--Graham
Please let's not forget that a tree data structure is often pretty
much useless without some form of balancing. Otherwise, in the worst
case, what you really have is a degenerate form of your tree (such as
a linked list for binary trees). Getting a balancing algorithm (such
as node rotations in a red-black tree) done right is no trivial task,
so I would agree with Andreas' comment not to underestimate the effort
required to roll one's own.
Wagner
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden