98% O(1) space and TIme
\nFInd the numbers which are not in array and then traverse them\n\n\n\nclass Solution:\n\n    def __init__(self, n: int, blacklist: List[int]):\n        blackl
\nFInd the numbers which are not in array and then traverse them\n\n\n```\nclass Solution:\n\n    def __init__(self, n: int, blacklist: List[int]):\n        blacklist.sort()\n        j = 0\n        self.ans = []\n        for i in blacklist:\n            while j <= i:\n                if j!=i:\n                    if len(self.ans)<10000:\n                        self.ans.append(j)\n                    else:\n                        break\n                j+=1\n        for i in range(j, n):\n            if len(self.ans)<10000:\n                self.ans.append(i)\n            else:\n                break\n        self.ind = 0\n    def pick(self) -> int:\n        self.ind+=1\n        return self.ans[self.ind%len(self.ans)]\n```
[]