@@ -0,0 +1,988 @@
+public class Solution %7B%0A    String result = %22%22;%0A    public String tree2str(TreeNode t)%7B%0A        if (t != null)%7B%0A            result += t.val;%0A            if(t.left != null %7C%7C t.right != null)%7B%0A                result += %22(%22;%0A            %7D%0A            tree2str(t.left);%0A            if(t.left != null %7C%7C t.right != null)%7B%0A                result += %22)%22;%0A            %7D%0A            if(t.right != null)%7B%0A                result += %22(%22;%0A                tree2str(t.right);%0A                result += %22)%22;%0A            %7D%0A        %7D%0A        return result;%0A    %7D%0A    static class TreeNode%7B%0A        int val;%0A        TreeNode left;%0A        TreeNode right;%0A        TreeNode(int x)%7B val = x; %7D%0A    %7D%0A%0A    public static void main(String%5B%5D args)%7B%0A        TreeNode root = new TreeNode(1);%0A        root.left = new TreeNode(2);%0A        root.right = new TreeNode(3);%0A        root.left.right = new TreeNode(4);%0A        Solution solution = new Solution();%0A        System.out.println(solution.tree2str(root));%0A    %7D%0A%7D%0A

complete problem 606