public TreeNode build(int left, int right) {
        if (left > right)
            return null;
        int mid = left + (right - left) / 2;
        TreeNode leftNode = build(left, mid - 1);
        TreeNode root = new TreeNode(node.val);
        root.left = leftNode;
        node = node.next;
        root.right = build(mid + 1, right);
        return root;
    }