Python Simple Intuitive Solution
\nfrom random import randint\nclass Solution(object):\n\n    def __init__(self, N, blacklist):\n        """\n        :type N: int\n        :type blacklist: List
```\nfrom random import randint\nclass Solution(object):\n\n    def __init__(self, N, blacklist):\n        """\n        :type N: int\n        :type blacklist: List[int]\n        """\n        self.dic = {}   \n        self.black_set = set(blacklist)\n        self.threshold = N - 1 - len(blacklist)\n        j = self.threshold + 1\n        for num in blacklist:\n            if num <= self.threshold:\n                while j < N and j in self.black_set:\n                    j += 1\n                self.dic[num] = j\n                j += 1\n\n    def pick(self):\n        """\n        :rtype: int\n        """\n        num = randint(0,self.threshold)\n        if num in self.dic:\n            return self.dic[num]\n        else:\n            return num\n```
[]