Re: TEST QUESTION ABOUT PARENT POINTER


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

Posted by quyen on July 29, 2001 at 21:29:01:

In Reply to: TEST QUESTION ABOUT PARENT POINTER posted by shawn on July 28, 2001 at 15:32:19:

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



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 ]