O(n) time, O(n) space.
\npublic class Solution {\n    public IList<bool> PrefixesDivBy5(int[] nums) {\n        var res = new List<bool>();\n        int curr = 0;\n        foreach(var 
```\npublic class Solution {\n    public IList<bool> PrefixesDivBy5(int[] nums) {\n        var res = new List<bool>();\n        int curr = 0;\n        foreach(var n in nums) {\n            curr = (2*curr + n) % 5;\n            res.Add(curr == 0);\n        }\n        return res;\n    }\n}\n```
[]