Easy C++ solution || 0(B) time complexity
\nclass Solution {\npublic:\n    int idx;\n    unordered_map<int, int>mp;\n    set<int> s;\n    Solution(int n, vector<int>& blacklist) {\n       idx = n - blac
```\nclass Solution {\npublic:\n    int idx;\n    unordered_map<int, int>mp;\n    set<int> s;\n    Solution(int n, vector<int>& blacklist) {\n       idx = n - blacklist.size();\n       n--;\n       for(int i = 0; i<blacklist.size(); i++) s.insert(blacklist[i]);\n       for(int i = 0; i<blacklist.size(); i++){\n           if(blacklist[i] < idx){\n           while(s.find(n) != s.end())n--;\n           mp[blacklist[i]] = n;\n           n--; \n           }\n       } \n    }\n    \n    int pick() {\n      int ans = rand()%(idx);\n      if(mp.count(ans)) return mp[ans];\n      return ans;\n    }\n};\n```
['C', 'C++']