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 -> data = data ; temp -> left = NULL ; temp -> right = NULL ; return ( temp ) ; }