simple and easy C++ solution
Intuition\nif we have 1,2 => then we can get xor value upto 3.\nSuppose the array = [1,2,4] => we can get xor val upto 7 using the numbers.\nSo we have to find 
# Intuition\nif we have 1,2 => then we can get xor value upto 3.\nSuppose the array = [1,2,4] => we can get xor val upto 7 using the numbers.\nSo we have to find a number which will not be formed from using this trick.\n\n# Complexity\n- Time complexity:\nO(N * log(N))\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\nO(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int minImpossibleOR(vector<int>& nums) {\n        sort(nums.begin(), nums.end());\n        int i=1;\n        int xorVal = 0;\n        int j=0;\n        while(j<nums.size()) {\n            if(nums[j] <= i) {\n                xorVal |= nums[j];\n                i= xorVal+1;\n            }\n            else {\n                return i;    \n            }\n            j++;\n        }\n        return xorVal+1;\n    }\n};\n```
['C++']