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


        }
    }