Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void replaceChild(AVLNode node, AVLNode curChild, AVLNode newChild ){
- if( node.lChild == curChild )
- node.lChild = newChild;
- else if( node.rChild == curChild )
- node.rChild = newChild;
- if( newChild != null )
- newChild.parent = node;
- }
Add Comment
Please, Sign In to add comment