Guest User

Untitled

a guest
Oct 20th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. void replaceChild(AVLNode node, AVLNode curChild, AVLNode newChild ){
  2. if( node.lChild == curChild )
  3. node.lChild = newChild;
  4. else if( node.rChild == curChild )
  5. node.rChild = newChild;
  6. if( newChild != null )
  7. newChild.parent = node;
  8. }
Add Comment
Please, Sign In to add comment