Easy to understand code!!!
Intuition\n Describe your first thoughts on how to solve this problem. \nObserving pattern for various inputs is the key to solve this problem.\n# Approach\n De
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nObserving pattern for various inputs is the key to solve this problem.\n# Approach\n<!-- Describe your approach to solving the problem. -->\n.................Input............ Answer.............\n.................1111...............111..................\n.................101................100..................\n................1011...............1001................\n................10111..............10011..............\n..........1010101111.......1010100111........\n# Complexity\n- Time complexity:$$O(n)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:$$O(n)$$ for storing result\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```python3 []\nclass Solution:\n    def minBitwiseArray(self, nums: List[int]) -> List[int]:\n        ans = []\n        for x in nums:\n            if x==2:\n                ans.append(-1)\n            else:\n                val = bin(x)[2:]\n                ind = val.rfind("0")\n                if ind == -1:\n                    ans.append(int(val[1:],2))\n                else:\n                    ans.append(int(val[:ind+1]+"0"+val[ind+2:],2))\n\n        return ans\n\n        \n```
['Python3']