✅Java || C++ || Python3✅ sort and Pow of 2
Please UPVOTE\uD83D\uDE0A\n\n# Python3\n\nclass Solution:\n    def minImpossibleOR(self, nums: List[int]) -> int:\n        nums.sort()\n        x=1\n        for
# Please UPVOTE\uD83D\uDE0A\n\n# Python3\n```\nclass Solution:\n    def minImpossibleOR(self, nums: List[int]) -> int:\n        nums.sort()\n        x=1\n        for i in nums:\n            if x==i:\n                x*=2\n        return x\n        \n```\n# C++\n```\nclass Solution {\npublic:\n    int minImpossibleOR(vector<int>& nums) {\n        long long int ans=1;\n        sort(nums.begin(),nums.end());\n        for(int i=0;i<nums.size();i++)\n        {\n            if(nums[i]==ans)\n            {\n                ans*=2;\n            }\n        }\n        return ans;\n    }\n};\n```\n# Java\n```\nclass Solution {\n    public int minImpossibleOR(int[] nums) {\n        Arrays.sort(nums);\n        int a = 1;\n        for(int i:nums)\n        {\n            if(i==a)\n            {\n                a=a*2;\n            }\n        }\n        return a;\n    }\n}\n```
['Sorting', 'C++', 'Python3']