public TreeNode build_helper(String[] arr) {
        if (arr[index].equals("#")) {
            index++;
            return null;
        }
        TreeNode root = new TreeNode(Integer.valueOf(arr[index++]));
        root.left = build_helper(arr);
        root.right = build_helper(arr);
        return root;
    }