Python | Mathematical Induction | Explained
Consider if we don\'t have 1 in nums, then the answer is 1 because you cannot use anything larger than 1 to form 1.\nConsider if we don\'t have 2 in nums, then 
Consider if we don\'t have `1` in `nums`, then the answer is `1` because you cannot use anything larger than `1` to form `1`.\nConsider if we don\'t have `2` in `nums`, then the answer is `2` because you cannot use `1` and anything larger than `2` to form `2`.\nBut if we have [1, 2] in `nums`, we can form `3`.\nSo, by Mathematical Induction, we know that if we have $1, 2, 2^2, 2^3,...,2^n$ in `nums`, we can form every number in $[1, 2^{n+1}-1]$. If we further have $2^{n+1}$ in `nums`, we can form every number in $[1, 2^{n+2}-1]$. If we don\'t have $2^{n+1}$ in `nums`, then the minimum unexpressible number is $2^{n+1}$.\n\n# Code\n```python []\nclass Solution:\n    def minImpossibleOR(self, nums: List[int]) -> int:\n        nums = set(nums)\n        for i in range(33):\n            if 1 << i not in nums:\n                return 1 << i\n        \n```
['Python3']