EASY C++ 4 LINES SOLUTION using MAPS
Intuition\n Describe your first thoughts on how to solve this problem. \nNo intituion Just the most rubbish question i have seen. Not disrespected but i was doi
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nNo intituion Just the most rubbish question i have seen. Not disrespected but i was doing this with some other apparoach for 1 hr\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nanyways, What u have to do is just check if 2*i exists in array or not if yes, then return last number *2 ;\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\no(n)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(n);\n\n# Code\n```\nclass Solution {\npublic:\n    int minImpossibleOR(vector<int>& nums) {\n        sort(nums.begin(),nums.end());\n        set<int> st;\n        int n=nums.size();\n        map<long long, int> mp;\n        for(auto i:nums) mp[i]++;\n        long long i; \n        for(i=1; i<=2e10; i=i*2)\n        {\n            if(mp[i]==0) return i;\n        }\n        return i;\n    }\n};\n```
['Ordered Map', 'C++']