package tree;public class DeleteBT {/*** 删除一颗二叉树* @param args*/public static TreeNode delete(TreeNode root){if(root==null) return root;root.left = delete(root.left);root.right = delete(root.right);return null;}public static void main(String[] args) {TreeNode root1 = new TreeNode(1);root1.left = new TreeNode(2);root1.right = new TreeNode(3);delete(root1);}}