easy-peasy solution | O(n) time complexity
Complexity\n- Time complexity: O(n)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(n)\n Add your space complexity here, e.g. O(n) \n\n# Co
# Complexity\n- Time complexity: O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(n)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    vector<bool> prefixesDivBy5(vector<int>& nums) {\n        vector<bool> ret;\n        int x = 0 ;\n        for(int i=0;i<nums.size();i++)\n        {\n            x = (x*2+nums[i])%5;\n            ret.push_back(x==0);\n        }\n        return ret;\n    }\n};\n```
['C++']