小于 1 分钟
Home > @hz-9/algorithm > AdelsonVelskiiLandiTree > _getNodeHeight
AdelsonVelskiiLandiTree._getNodeHeight() method
Get the height of a node.
获取节点高度。
Signature:
protected _getNodeHeight(node: TreeNode<T> | undefined): number;Parameters
Parameter | Type | Description |
|---|---|---|
node | TreeNode<T> | undefined | The node. |
Returns:
number
The height of the node. If the node is missing, it returns -1.