Tap here to switch tabs
Problem
Ask
Submissions

Problem: Kth Missing Positive Number

med
30 min
Understand how to apply a modified binary search technique to find the kth missing positive integer in a strictly increasing array. This lesson helps develop problem-solving skills for search-related coding interview questions.

Statement

Given a strictly increasing array arr of positive integers and a positive integer k, return the kthk^{th} positive integer that is missing from arr.

Constraints:

  • 11 \leq arr.length 103\leq 10^3

  • 11 \leq arr[i] 103\leq 10^3

  • 11 \leq k 103\leq 10^3

  • arr[i] << arr[j] for 11 \leq i << j \leq arr.length

Tap here to switch tabs
Problem
Ask
Submissions

Problem: Kth Missing Positive Number

med
30 min
Understand how to apply a modified binary search technique to find the kth missing positive integer in a strictly increasing array. This lesson helps develop problem-solving skills for search-related coding interview questions.

Statement

Given a strictly increasing array arr of positive integers and a positive integer k, return the kthk^{th} positive integer that is missing from arr.

Constraints:

  • 11 \leq arr.length 103\leq 10^3

  • 11 \leq arr[i] 103\leq 10^3

  • 11 \leq k 103\leq 10^3

  • arr[i] << arr[j] for 11 \leq i << j \leq arr.length