mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-24 12:06:07 +00:00
Add missing Dart codes and fix some errors (#689)
* Add missing Dart codes and fix some errors * Update array_binary_tree.dart --------- Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
@@ -18,6 +18,7 @@ class AVLTree {
|
||||
|
||||
/* 获取节点高度 */
|
||||
int height(TreeNode? node) {
|
||||
// 空节点高度为 -1 ,叶节点高度为 0
|
||||
return node == null ? -1 : node.height;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user