(node)
| 101 | |
| 102 | // height difference or balance factor of a node |
| 103 | const getHeightDifference = function (node) { |
| 104 | return node == null ? 0 : getHeight(node._left) - getHeight(node._right) |
| 105 | } |
| 106 | |
| 107 | // update height of a node based on children's heights |
| 108 | const updateHeight = function (node) { |
no test coverage detected