Java - simple - unset each bit - approach
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: $$O(nlogB)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(n)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```java []\nclass Solution {\n    public int[] minBitwiseArray(List<Integer> nums) {\n        int n = nums.size(), k = 0;\n        int[] ans = new int[n];\n        for(Integer num : nums)\n            ans[k++] = getBitwiseItem(num);\n        return ans;\n    }\n    private int getBitwiseItem(int no) {\n        char[] binStr = Integer.toBinaryString(no).toCharArray();\n        int n = binStr.length;\n        if(binStr[n - 1] == \'0\') return -1;  // even no\n        for(int i = 0; i < n; i++) {\n            if(binStr[i] == \'1\') {\n                char[] newer = new char[n];\n                for(int j = 0; j < n; j++)\n                    if(j == i)\n                        newer[j] = \'0\';\n                    else newer[j] = binStr[j];\n                int newNo = Integer.parseInt(new String(newer), 2);\n                if((newNo | newNo + 1) == no)   return newNo;\n            }\n        }\n        return no / 2;\n    }\n}\n```
['Java']