what commands in this code are changing the structure of the tree?
lines like this:
only changes our perspective on the treeCode:save=save->lc;
this line only makes us look on a different section of a tree
what commands in this code are changing the structure of the tree?
lines like this:
only changes our perspective on the treeCode:save=save->lc;
this line only makes us look on a different section of a tree
Last edited by transgalactic2; 10-29-2008 at 07:49 AM.
what commands change the structure of a tree?
Last edited by transgalactic2; 10-29-2008 at 03:59 AM.
A tree is changed by adding or deleting a node.
QuantumPete
"No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
"Have you tried turning it off and on again?" - The IT Crowd
i got this example
look how this function change it
and in this code there is no adding or deleting nodes
so i am wondering from where these changes came from?
http://img397.imageshack.us/my.php?i...2032860fw8.gif
Last edited by transgalactic2; 10-29-2008 at 04:21 AM.
"No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
"Have you tried turning it off and on again?" - The IT Crowd
but in this code i only see references stuff
o addition or deletion
You CHANGE the structure of a BST by changing what the left and right nodes point to. In this case, there are a few lines where lc or rc is set to point at a different node.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.