C++ in-place 100%
\ncpp []\nclass Solution {\npublic:\n    vector<int> minBitwiseArray(vector<int> nums) const {\n        \n        for (int i = 0; i != nums.size(); ++i) {\n    
\n```cpp []\nclass Solution {\npublic:\n    vector<int> minBitwiseArray(vector<int> nums) const {\n        \n        for (int i = 0; i != nums.size(); ++i) {\n            int target = exchange(nums[i], -1);            \n            for (int val = 1; val != target; ++val) {\n                if ((val | (val+ 1)) == target) {\n                    nums[i] = val;\n                    break;\n                }\n            }            \n        }\n        return nums;\n    }\n};\n```
['C++']