O(nlog(n)) solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: $$O(nlog(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```\nclass Solution {\npublic:\n    int minImpossibleOR(vector<int>& nums) {\n        int n = nums.size();\n        sort(nums.begin(),nums.end());\n        int curr=0;\n        for(int i=0;i<n;i++){\n            if(nums[i]>curr+1) return ++curr;\n            curr|=nums[i];\n        }\n        return ++curr;\n    }\n};\n```
['C++']