AVL tree helper functions height returns the height of a node.
(node *treeNode)
| 239 | |
| 240 | // height returns the height of a node. |
| 241 | func height(node *treeNode) int { |
| 242 | if node == nil { |
| 243 | return 0 |
| 244 | } |
| 245 | return node.height |
| 246 | } |
| 247 | |
| 248 | // updateHeight updates the height of a node based on children. |
| 249 | func updateHeight(node *treeNode) { |
no outgoing calls
no test coverage detected