小于 1 分钟
Home > @hz-9/algorithm > AdelsonVelskiiLandiTree > _getBalanceFactor
AdelsonVelskiiLandiTree._getBalanceFactor() method
Get the height difference of a node.
获取节点高度差距。
Signature:
protected _getBalanceFactor(node: TreeNode<T>): BalanceFactor;Parameters
Parameter | Type | Description |
|---|---|---|
node | TreeNode<T> | The node. |
Returns:
BalanceFactor
The height difference. Usually one of the five integers: -2, -1, 0, 1, 2.