public TreeNode sortedArrayToBST(int[] A) {
        // write your code here
        if (A == null || A.length == 0)
            return null;
        int begin = 0, end = A.length - 1;
        return build(begin, end, A);
    }