Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > Algorithms > tree node paren...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 4802 of 4944
Post > Topic >>

tree node parent, trees as data structure

by DoctorC <ecolautti@[EMAIL PROTECTED] > Jun 17, 2008 at 10:25 AM

Hi,
I need to use a tree structure to represent data divided in groups and 
I'm thinking about representing it with a binary tree:

left child - sibling
right child - child

that's good for traversing, etc.

My doubt arises when I need to reference the parent of a node.

The only way I can think of is adding a field to each node pointing to 
the parent

Any other suggestions?

Would you use a binary tree or stick with a general tree? Or maybe 
another data structure like a list of lists?

Enrico
 




 4 Posts in Topic:
tree node parent, trees as data structure
DoctorC <ecolautti@[EM  2008-06-17 10:25:39 
Re: tree node parent, trees as data structure
"4N" <xxx@[E  2008-06-17 13:07:51 
Re: tree node parent, trees as data structure
Kaba <none@[EMAIL PROT  2008-06-17 18:25:18 
Re: tree node parent, trees as data structure
DoctorC <ecolautti@[EM  2008-06-17 20:34:41 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Aug 20 3:49:23 CDT 2008.