Update LevelOrderTraversal.java

This commit is contained in:
Varun Upadhyay 2018-08-28 06:25:55 -07:00 committed by GitHub
parent 28deddd5d7
commit 2dc86b6a04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ public class LevelOrderTraversal
else
{
/**
* return the larger one;
* Return the height of larger subtree
*/
return Math.max(height(root.left),height(root.right)) + 1;
}