Search⌘ K
AI Features

Solution: Kth Missing Positive Number

Explore how to identify the kth missing positive number from a strictly increasing array of positive integers by applying a modified binary search. Understand how to calculate missing counts and efficiently narrow down the search space. This lesson helps you implement the solution with optimal time and constant space complexity.

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 ...