MCPcopy Index your code
hub / github.com/TheAlgorithms/JavaScript / getHeight

Function getHeight

Data-Structures/Tree/AVLTree.js:95–100  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

93
94// get height of a node
95const getHeight = function (node) {
96 if (node == null) {
97 return 0
98 }
99 return node._height
100}
101
102// height difference or balance factor of a node
103const getHeightDifference = function (node) {

Callers 2

getHeightDifferenceFunction · 0.85
updateHeightFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected