pivot
.
b. Check the number of missing integers before arr[pivot]
.
c. If the number of missing integers is less than k
, move the left pointer to pivot + 1
.
d. Otherwise, move the right pointer to pivot - 1
.k
. The kth
missing number will be k + left
.