题目网址:https://leetcode-cn.com/problems/construct-string-from-binary-tree/
你需要采用前序遍历的方式,将一个二叉树转换成一个由括号和整数组成的字符串。
/**
* Definition for a binary tree node.
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode(int x) { val = x; }
* }
*/
class Solution {
private StringBuffer stringBuffer = new StringBuffer();
pu