public void insert(int value) { root = insert_node(root, value); }
private int height(AVLNode node) { return((node == null)? -1:node.height); }
private bool isRightHeavy(AVLNode node) { return(balanceFactor(node) < -1); }
private bool isLeftHeavy(AVLNode node) { return(balanceFactor(node) > 1); }
private int balanceFactor(AVLNode node) { return((root == null)? 0: height(node.leftChild) - height(node.rightChild)); }
private bool isLeaf(AVLNode root) { return(root.leftChild == null && root.rightChild == null); }