[ Problem No. 1018 ] Easy solution for beginners | C++
\nclass Solution {\npublic:\n\tvector<bool> prefixesDivBy5(vector<int>& nums) {\n\t\tvector<bool> res;\n\t\tint t = 0;\n\t\tfor(int i = 0; i < nums.size(); i++)
```\nclass Solution {\npublic:\n\tvector<bool> prefixesDivBy5(vector<int>& nums) {\n\t\tvector<bool> res;\n\t\tint t = 0;\n\t\tfor(int i = 0; i < nums.size(); i++){\n\t\t\tt = (t  * 2  + nums[i]) % 5;\n\t\t\tres.push_back(t == 0);\n\t\t}\n\t\treturn res;\n\t}\n};\n```\n***Please upvote if it was helpful for you, thank you!***
['Array', 'C', 'C++']