mirror of
https://github.com/krahets/hello-algo.git
synced 2025-12-19 07:17:54 +08:00
docs(tree/avl_tree): add go code
This commit is contained in:
@@ -16,8 +16,7 @@ func newAVLTree() *avlTree {
|
||||
return &avlTree{root: nil}
|
||||
}
|
||||
|
||||
/* 获取结点高度
|
||||
*/
|
||||
/* 获取结点高度 */
|
||||
func height(node *TreeNode) int {
|
||||
// 空结点高度为 -1 ,叶结点高度为 0
|
||||
if node != nil {
|
||||
|
||||
Reference in New Issue
Block a user