Given a strictly ascending array of positive integers, output the Kth number that is missing from it.
For example:
- (2, 14, 16, 17) K = 4 output: 5 (explanation: missing numbers are 1,3,4,5,6,.. and find the Kth missing number which is 5 as K = 4)
- (8, 9) K = 1 output: 1
- (8, 9) K=1000000 output:1000002
Expected runtime O(log N) where N = array length