Bit operation
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
 public:
  int MinBitwise(int n) const {
    int ones_right = 0;
    int flag = 1;
    while (n & flag) {
      ++ones_right;
      flag <<= 1;
    }
    if (!ones_right) {
      return -1;
    }
    flag = ~(1 << (ones_right - 1));

    return n & flag;
  }

  std::vector<int> minBitwiseArray(std::vector<int>& nums) const {
    std::vector<int> res;
    res.reserve(nums.size());
    for (int num : nums) {
      res.push_back(MinBitwise(num));
    }
    return res;
  }
};
```
['C++']