corrections


[ Follow Ups ] [ Post Followup ] [ CS328 Message Board ] [ FAQ ]

Posted by quyen on July 29, 2001 at 21:41:53:

In Reply to: Re: TEST QUESTION ABOUT PARENT POINTER posted by quyen on July 29, 2001 at 21:29:01:

: void leftToRightRotate (treeNode * & root)
: {
: treeNode * psave = root->psave;
: treeNode * save = root;
: root = save->leftChild;
: save->leftChild = root->rightChild;
: root->rightChild = save;
: root->parent = psave->parent;
: save->parent = root;
: save->leftChild->parent = save;
: }

: //3 parent pointers are updated

corrections the first line should be:
treeNode * psave = root->parent;


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS328 Message Board ] [ FAQ ]