Using Map || Very Easy Approach || C++✅
Code\n\n\npython3 []\nclass Solution:\n    def minImpossibleOR(self, nums: List[int]) -> int:\n        vals, ans = set(nums), 0\n        for i in range(31):\n  
# Code\n```\n```\n```python3 []\nclass Solution:\n    def minImpossibleOR(self, nums: List[int]) -> int:\n        vals, ans = set(nums), 0\n        for i in range(31):\n            val = 2**i\n            if val in vals:\n                ans += val\n                continue\n            return ans + 1\n```\n```C++ []\npublic:\n    int minImpossibleOR(vector<int>& nums)\n    {\n        map<int, int>mp;\n        \n        for(auto i : nums)\n        {\n            mp[i]++;\n        }\n        \n        int i = 1;\n        \n        while(true)\n        {\n            if(mp.find(i) == mp.end())\n            {\n                return i;\n            }\n            i *= 2;\n        }\n        \n        return i;\n    }\n};\n```
['Ordered Map', 'C++', 'Python3']