Code + Video Solution with Concept || C++ Solution
Intuition\n\n# Approach\nhttps://www.youtube.com/watch?v=KenyvrJr6B4\n\n# Complexity\n- Time complexity: O(N)\n Add your time complexity here, e.g. O(n) \n\n- S
# Intuition\n\n# Approach\nhttps://www.youtube.com/watch?v=KenyvrJr6B4\n\n# Complexity\n- Time complexity: O(N)\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```\n\nclass Solution {\npublic:\n    int minImpossibleOR(vector<int>& arr) \n    {\n        vector<int>brr(32, 0);\n        unordered_map<long long int,int>mp;\n        int n = arr.size();\n        \n        for(int i=0; i<n; i++) mp[arr[i]]++;\n        \n        for(int i=0; i<32; i++)\n        {\n            for(int j=0; j<n; j++)\n            {\n                if((arr[j]>>i)&1)\n                {\n                    brr[i]++;\n                }\n            }\n        }\n        \n        for(int i=0; i<32; i++)\n        {\n            long long int curr = pow(2,i);\n            if(!mp[curr]) return curr;\n            if(!brr[i]) return curr;\n        }\n        \n        return 0;\n    }\n};\n```
['C++']