Python3 one random() and one bisect() for each pick
\nfrom random import random\nfrom bisect import bisect\n\nclass Solution:\n\n    def __init__(self, n: int, blacklist: List[int]):\n        blacklist.sort()\n  
```\nfrom random import random\nfrom bisect import bisect\n\nclass Solution:\n\n    def __init__(self, n: int, blacklist: List[int]):\n        blacklist.sort()\n        delta = 0\n        self.offsets = []\n        for v in blacklist:\n            self.offsets.append(v-delta)\n            delta += 1\n        self.randmax = n-delta\n        assert(self.randmax>=1)\n        \n\n    def pick(self) -> int:\n        rnd = int(random()*self.randmax)\n        ind = bisect(self.offsets, rnd)\n        return rnd+ind\n```
['Python']