O(n) Solution | Java
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:\nO(n)\n\n- Space complexity:\nO(n)\n\n# Code\n```java []\nclass Solution {\n    public int minImpossibleOR(int[] nums) {\n        Set<Integer> hashSet=new HashSet<>();\n        for(int num: nums){\n            hashSet.add(num);\n        }\n        int ans = 0;\n        for(int i=0;i<32;i++){\n            int power = (int) Math.pow(2, i);\n            if(!hashSet.contains(power)){\n                ans = i;\n                break;\n            }\n        }\n        return (int) Math.pow(2,ans);\n    }\n}\n```
['Java']