getPrefixSum(count) {
        this._ensureValid();
        if (count === 0) {
            return 0;
        }
        return this._prefixSum[count - 1];
    }
Returns the sum of the first `count` many items.
@returns `SUM(0 <= j < count, values[j])`.