Simple C# O(n) solution with NO math and detailed description.
Intuition\n- 1 (0b001) is only expressable if 1 (0b001) is in the array.\n- 2 (0b001) is only expressible if 2(0b001) is in the array.\n- if 3 (0b011) is NOT ex
# Intuition\n- 1 (0b001) is only expressable if 1 (0b001) is in the array.\n- 2 (0b001) is only expressible if 2(0b001) is in the array.\n- if 3 (0b011) is NOT expressible, then some number less than\n3 is also not expressible because if 1 and 2 were both expressible then so would 3.  0b001 | 0b010 = 0b011\n- 4 (0b100) is only expressible if 4 (0b100) is in the array.\n- if 5 (0b101) is NOT expressible, then some number less than 5 is also not expressible because if 1, 2, and 4 were all expressible then so would 5.  0b001 | 0b100 = 0b101\n- This continues.\n-- Any number that is a power of 2 is only expressible if it\'s in the array.\n-- Any number that is NOT a power of 2 is automatically expressible if all powers of two BELOW it are expressible.\n- Therefore, the least NOT expressible value is the first power of 2 that is NOT in the array.\n\n# Approach\n- Convert the array to a dictionary so we can do fast lookup.\n- Check each power of 2 <= the max of 10^9.  If it\'s not in the dictionary, return it.\n- Once we exceed the maximum possible value in the array, we must be at the minimum not expressible value.\n\n# Complexity\n- Time complexity:\n$$O(n)$$\n\n- Space complexity:\n$$O(n)$$\n\n# Code\n```\n/*\nhttps://leetcode.com/problems/minimum-impossible-or/\n\nYou are given a 0-indexed integer array nums.\n\nWe say that an integer x is expressible from nums if there exist\nsome integers 0 <= index1 < index2 < ... < indexk < nums.length\nfor which nums[index1] | nums[index2] | ... | nums[indexk] = x.\nIn other words, an integer is expressible if it can be written\nas the bitwise OR of some subsequence of nums.\n\nReturn the minimum positive non-zero integer that is\nnot expressible from nums.\n\nExample 1:\n\nInput: nums = [2,1]\nOutput: 4\nExplanation: 1 and 2 are already present in the array.\nWe know that 3 is expressible, since nums[0] | nums[1] = 2 | 1 = 3. Since 4 is not expressible, we return 4.\nExample 2:\n\nInput: nums = [5,3,2]\nOutput: 1\nExplanation: We can show that 1 is the smallest number that is not expressible.\n*/\n\npublic class Solution {\n    public int MinImpossibleOR(int[] nums) {\n        Dictionary<int, int> dict = new();\n        for(int i = 0; i < nums.Length; i++)\n        {\n            // Use TryAdd in case there are dupes in the array.\n            dict.TryAdd(nums[i], i);\n        }\n\n        // We are given a max of nums[i] <= 10^9\n        int max = 1000000000;\n        int next = 1;\n        for(next = 1; next <= max; next <<= 1)\n        {\n            if(!dict.ContainsKey(next))\n            {\n                return next;\n            }\n        }\n        return next;\n    }\n}\n\n\n```
['C#']