simple and easy C++ solution 😍❤️‍🔥
\n# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n###### Let\'s Connect on LinkedIn: www.linkedin.com/in/shishirrsiam\n###### Let\'s Connect on Facebook
\n# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n###### Let\'s Connect on LinkedIn: www.linkedin.com/in/shishirrsiam\n###### Let\'s Connect on Facebook: www.fb.com/shishirrsiam\n\n# Complexity\n- Time complexity: O(n log m)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(n)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int sz;\n    vector<int>nums;\n    Solution(int n, vector<int>& blacklist) \n    {\n        n = min(100000, n);\n        set<int>st(begin(blacklist), end(blacklist));\n        for(int i=0;i<n;i++)\n            if(not (st.count(i)))\n                nums.push_back(i);\n        sz = nums.size();\n    }\n    \n    int pick() \n    {\n        int idx = rand() % sz; \n        return nums[idx];\n    }\n};\n```
['Array', 'Hash Table', 'Math', 'Binary Search', 'Sorting', 'Ordered Set', 'Randomized', 'C++']