Rust O(n) one liner
Intuition\n\nTake $x$ to be the first power of two that is not included directly in nums. We can create every number less than $x$ by selectively or-ing togethe
# Intuition\n\nTake $x$ to be the first power of two that is not included directly in nums. We can create every number less than $x$ by selectively or-ing together the other power of two\'s. Therefore $x$ must be the smallest number that cannot be created.\n\nOur task is now simplified to "find the smallest power of two that is not contained in nums"\n\n# Approach\n- filter out non power of two\'s\n- or together remaining nums to get a bitmap of which powers of two are contained\n- count the trailing ones to get the index (exponent) of the first zero bit (the first missing power of 2)\n- get the value by shifting left\n\n# Code\n```\nimpl Solution {\n    pub fn min_impossible_or(nums: Vec<i32>) -> i32 {\n        1 << nums.into_iter()\n            .filter(|n| n.count_ones() == 1)\n            .fold(0, |p, c| p | c)\n            .trailing_ones()\n    }\n}\n```
['Rust']