Helper function that allocates a new node with the given data and NULL left and right pointers .
Node * newNode ( int data ) { Node * temp = new Node ; temp -> val = data ; temp -> left = temp -> right = NULL ; return temp ; }