Utility function to find height of a tree , rooted at ' root ' .
static int height ( Node root ) { if ( root == null ) return 0 ; int leftHt = height ( root . left ) ; int rightHt = height ( root . right ) ; return Math . max ( leftHt , rightHt ) + 1 ; }