GO | Brute Force
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:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```golang []\nfunc minBitwiseArray(nums []int) []int {\n\tn := len(nums)\n\tans := make([]int, n)\n\n\tfor idx := 0; idx < n; idx++ {\n\t\tfor num := 1; num <= nums[idx]; num++ {\n\t\t\tif num|(num+1) == nums[idx] {\n\t\t\t\tans[idx] = num\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif ans[idx] == 0 {\n\t\t\tans[idx] = -1\n\t\t}\n\t}\n\n\treturn ans\n}\n```
['Go']