private void Traversal(TreeNode root,ArrayList<Integer> list) {
       if(root != null){
           Traversal(root.left,list);
           Traversal(root.right,list);

           list.add(root.val);
       }
   }