C++ || Fast and Easy Method
\n    vector prefixesDivBy5(vector& A) \n    {\n        vector res;\n        int n = A.size();\n        \n        int num = 0;\n        \n        for(int i = 0;
\n    vector<bool> prefixesDivBy5(vector<int>& A) \n    {\n        vector<bool> res;\n        int n = A.size();\n        \n        int num = 0;\n        \n        for(int i = 0; i < n; i++)\n        {\n            num = num * 2 + A[i];\n            if(num % 5 == 0)\n                res.push_back(true);\n            else\n                res.push_back(false);\n            num = num % 5;    \n        }\n        \n        return res;\n    }\n
['C', 'C++']