Skip to content

Commit e521d18

Browse files
committed
Fix for get_height()
1 parent 9c74445 commit e521d18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/avl_tree.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ AVLTree() = AVLTree{Any}()
3232

3333
Base.length(tree::AVLTree) = tree.count
3434

35-
get_height(node::Union{AVLTreeNode, Nothing}) = (node == nothing) ? Int32(0) : node.height
35+
get_height(node::Union{AVLTreeNode, Nothing}) = (node == nothing) ? Int8(0) : node.height
3636

3737
# balance is the difference of height between leftChild and rightChild of a node.
3838
function get_balance(node::Union{AVLTreeNode, Nothing})

0 commit comments

Comments
 (0)