Simple C# solution
Complexity\n- Time complexity: O(n)\n- Space complexity: O(n)\n\n# Code\n\npublic class Solution\n{\n    public IList<bool> PrefixesDivBy5(int[] nums)\n    {\n 
# Complexity\n- Time complexity: $$O(n)$$\n- Space complexity: $$O(n)$$\n\n# Code\n```\npublic class Solution\n{\n    public IList<bool> PrefixesDivBy5(int[] nums)\n    {\n        var result = new List<bool>();\n        var num = 0;\n        foreach (var n in nums)\n        {\n            num = (num * 2 + n) % 5;\n            result.Add(num == 0);\n        }\n\n        return result;\n    }\n}\n```
['C#']