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