C# brute force
Complexity\n- Time complexity: O(n \times 2^m)\n- Space complexity: O(n)\n\n# Code\ncsharp []\npublic class Solution\n{\n    public int[] MinBitwiseArray(IList<
# Complexity\n- Time complexity: $$O(n \\times 2^m)$$\n- Space complexity: $$O(n)$$\n\n# Code\n```csharp []\npublic class Solution\n{\n    public int[] MinBitwiseArray(IList<int> nums)\n    {\n        var result = Enumerable.Repeat(-1, nums.Count).ToArray();\n\n        for (var i = 0; i < nums.Count; i++)\n        {\n            for (int j = 0; j < nums[i]; j++)\n            {\n                if ((j | (j + 1)) == nums[i])\n                {\n                    result[i] = j;\n                    break;\n                }\n            }\n        }\n\n        return result;\n    }\n}\n```
['C#']