3-4 lines of code, Easy and simple, C++ solution
Approach\nObserve\n- 1 = 1\n- 2 = 10\n- 4 = 100\n- 8 = 1000\n- 16 = 10000\nNotice, 3 can be generated by 1|2, 5 can be generated by 1|4, 6 can be generated by 2
# Approach\n**Observe**\n- 1 = 1\n- 2 = 10\n- 4 = 100\n- 8 = 1000\n- 16 = 10000\nNotice, 3 can be generated by 1|2, 5 can be generated by 1|4, 6 can be generated by 2|4, 7 can be generated by 3|4.\nBut, those number can not be generated by OR operation of any number which come in power of 2.\n\n**So, our answer is, we have to find first number in power of 2, which is not present in given array.**\n\n# Code\n```\nclass Solution {\npublic:\n    int minImpossibleOR(vector<int>& nums) \n    {\n    \n        unordered_set<int>st(nums.begin(),nums.end());\n        int x=1;  // starting from 1st bit\n        while(true)\n        {\n            if(!st.count(x))\n            break;\n            x <<=1;   // find number with next bit\n        }\n        return x;   // x is not present in nums\n    }\n};\n```
['Bit Manipulation', 'C++']