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