Helper function that allocates a new node with the given data and NULL left and right pointers .
static Node newNode ( int data ) { Node node = new Node ( ) ; node . data = data ; node . left = null ; node . right = null ; return ( node ) ; } static int heightOfTree ( Node root ) { return heightOfTreeUtil ( root , false ) ; }