public static BinaryTreeNode <T> LeftRotation <T>(this BinaryTreeNode <T> root) { return(null); }
public static int BalanceFactor <T>(this BinaryTreeNode <T> root) { return(Height(root.left) - Height(root.right)); }
public static bool IsBalance <T>(this BinaryTreeNode <T> root) { int balanceFactor = root.BalanceFactor(); return(-1 <= balanceFactor && balanceFactor <= 1); }
public BinaryTreeNode(T value, BinaryTreeNode <T> left, BinaryTreeNode <T> right) { this.value = value; this.left = left; this.right = right; }