text: Function that allocates a new node with the given data and null to its left and right pointers
code: static TreeNode newNode ( int data ) { TreeNode Node = new TreeNode ( ) ; Node . data = data ; Node . left = null ; Node . right = null ;