✅ C# | readable solution 🚅 faster than 95%
\n\nDon\'t hesitate to suggest or ask bellow about something that you don\'t understand\n\ncsharp []\npublic class Solution {\n    public int[] MinBitwiseArray(
![image.png](https://assets.leetcode.com/users/images/1ffddb85-e88b-4cc3-9f6d-df5da7dc6eed_1729713269.5804932.png)\n\n**Don\'t hesitate to suggest or ask bellow about something that you don\'t understand**\n\n```csharp []\npublic class Solution {\n    public int[] MinBitwiseArray(IList<int> nums) {\n        List<int> ls = new();\n        foreach (int n in nums)\n        {\n            bool IsPrime = false;\n            for (int i = 0; i < n; i++)\n            {\n                int ans = i | i + 1;\n                if (n == ans)\n                {\n                    IsPrime = true;\n                    ls.Add(i);\n                    break;\n                }\n            }\n            if (!IsPrime)\n                ls.Add(-1);\n        }\n        return ls.ToArray();\n    }\n}\n```\n\nIf you like it don\'t forget to **upvote!**
['C#']