1539. Kth Missing Positive Number
Easy
Given an array arr
of positive integers sorted in a strictly increasing order, and an integer k
.
Return the kth
positive integer that is missing from this array.
Example 1:
Example 2:
Constraints:
1 <= arr.length <= 1000
1 <= arr[i] <= 1000
1 <= k <= 1000
arr[i] < arr[j]
for1 <= i < j <= arr.length
Follow up:
Could you solve this problem in less than O(n) complexity?
解題
Previous1523. Count Odd Numbers in an Interval RangeNext1557. Minimum Number of Vertices to Reach All Nodes
Last updated