Skip to content

Commit 31c3a21

Browse files
authored
Update BasicOperations.java
1 parent 7ac8e25 commit 31c3a21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Binary Tree/BasicOperations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static int max(Node node) {
2727

2828
public static int height(Node node) {
2929
if(node==null)
30-
return 0;
30+
return -1;
3131
int lmax=height(node.left);
3232
int rmax=height(node.right);
3333
return Math.max(lmax,rmax)+1;

0 commit comments

Comments
 (0)