Java Solution. Find first 2^x not presented in initial array
Intuition\nMain idea - you can\'t form 2^x using some OR operators. And if you have, for example, 1, 2 and 4 you can generate any number until 8. \n\n# Code\n\n
# Intuition\nMain idea - you can\'t form 2^x using some OR operators. And if you have, for example, 1, 2 and 4 you can generate any number until 8. \n\n# Code\n```\nclass Solution {\n    public int minImpossibleOR(int[] nums) {\n        Set<Integer> n = new HashSet<>();\n        for(int num : nums) n.add(num);\n        int i = 1;\n        while(n.contains(i)) i*=2;\n        return i;\n    }\n}\n```
['Java']