Python easy solution - binary search - 7 lines
Easy solution, similar to the Leet 1539.\n\npython\nclass Solution:\n\n    def __init__(self, N: int, blacklist: List[int]):\n        self.N = N\n        self.a
Easy solution, similar to the [Leet 1539](https://leetcode.com/problems/kth-missing-positive-number/).\n\n```python\nclass Solution:\n\n    def __init__(self, N: int, blacklist: List[int]):\n        self.N = N\n        self.arr = [-1] + sorted(list(set(blacklist)))\n        self.length = len(self.arr)\n        self.missing = [self.arr[i]-i+1 for i in range(self.length)]\n\n    def pick(self) -> int:\n        k = random.randint(1,self.N-self.length+1)\n        index = bisect.bisect_left(self.missing,k)\n        return self.arr[index-1]+k-self.missing[index-1]\n```
[]