Structure of a Tree Node
class TreeNode { public int val ; public TreeNode left , right ; } ; static TreeNode newNode ( int key ) { TreeNode temp = new TreeNode ( ) ; temp . val = key ; temp . left = temp . right = null ; return temp ; }