@@ -0,0 +1,1455 @@
+package coding4fun;%0A%0A/**%0A * Invert a binary tree.%0A * %0A * Input:%0A *        1%0A *       / %5C%0A *      2   3%0A *     / %5C%0A *    4   5%0A *       /%0A *      6%0A *       %0A * Output:%0A *        1%0A *       / %5C%0A *      3   2%0A *         / %5C%0A *        5   4%0A *         %5C%0A *          6%0A */%0Apublic class Problem16 %7B%0A    private static class Node %7B%0A        private int value;%0A        private Node left;%0A        private Node right;%0A        %0A        public Node(int value) %7B%0A            this.value = value;%0A        %7D%0A        %0A        @Override%0A        public String toString() %7B%0A            return Integer.toString(value);%0A        %7D%0A    %7D%0A    %0A    private static void invert(Node node) %7B%0A        if (node == null) %7B%0A            return;%0A        %7D%0A        Node left = node.left;%0A        invert(left);%0A        Node right = node.right;%0A        invert(right);%0A        node.right = left;%0A        node.left = right;%0A    %7D%0A    %0A    public static void main(String%5B%5D args) %7B%0A        Node root = new Node(1);%0A        root.left = new Node(2);%0A        root.right = new Node(3);%0A        root.left.left = new Node(4);%0A        root.left.right = new Node(5);%0A        root.left.right.left = new Node(6);%0A        %0A        invert(root);%0A        System.out.println(root);%0A        System.out.println(root.left);%0A        System.out.println(root.right);%0A        System.out.println(root.right.left);%0A        System.out.println(root.right.right);%0A        System.out.println(root.right.left.right);%0A    %7D%0A%7D%0A

Add problem 16