# \*1060. Missing Element in Sorted Array

[https://leetcode.com/problems/missing-element-in-sorted-array/](https://leetcode.com/problems/missing-element-in-sorted-array/)

## solution

```python
class Solution:
    def missingElement(self, nums: List[int], k: int) -> int:
        minn = nums[0]

        left = 0
        right = len(nums) - 1
        while left < right:
            mid = left + (right - left + 1) // 2

            if nums[mid] >= minn + k + mid:
                right = mid - 1
            else:
                left = mid
        return minn + left + k
```

时间复杂度：O()\
空间复杂度：O()

## follow up

[658. Find K Closest Elements](https://leetcode.com/problems/find-k-closest-elements/description/)

```python
# 找到起点

```
