Python linear time solution with explaination
Intuition\n Describe your first thoughts on how to solve this problem. \n1. for every number canbe forming as sum if some powe of 2(also binary):\neg: 11 --> 10
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n1. for every number canbe forming as sum if some powe of 2(also binary):\neg: 11 --> 1010 --> 1 *pow(2,3)+0 *pow(2,2)+1 *pow(2,1) + 0 *pow(2,0) \n2.  op a|b means set x bit to 1 if one of a or b set 1 in x bit\n\nwith | operattions for any times, a large number its can be forming from small value which are power of 2 if exists: \n1 2 4 8 16....\neg. 1|2=3 \nso the \'minium impossible or value\' is the first value of power 2 but not in nums\n\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\niterator all power of 2 and find the first one not in nums\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(N)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(1)\n\n# Code\n```\nclass Solution(object):\n    def minImpossibleOR(self, nums):\n        """\n        :type nums: List[int]\n        :rtype: int\n        """\n        nums,ans=set(nums),1\n        while ans in nums:ans=ans<<1\n        return ans \n```
['Python']