|
-
May 4th, 2003, 01:48 PM
#1
How do you make an insert method in a LS-RB tree?
Hi there!
I'm having troubles making an insert method on a Leftest Son - Right Brother tree (I'm sorry if I wrote it wrong, please make me know), I just know how to make it on a binary tree, but if you know this kind of tree and know the implementation of this method, I will be very pleased if you help me.
Thank you and bye.
I'm sorry I didn't explain deeply how this tree works, first of all you may know that my native languaje is spanish, so sorry for any mistake.
In this kind of tree, any node may have any number of 'sons', but each node only has a pointer to the son in the left, how do you know the father of the other sons? Well, the son on the left begins a pionter list of the remaining sons, so a node has no pointers to all his sons, only the brother on the left can say who is their father.
There's something more I've just learned: it's very difficult to know in which node you have to insert, but knowing the father of a node when inserting makes things more easier.
I hope now you may understand and could help me.
Last edited by Deiby; May 10th, 2003 at 12:27 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|