With Explanation Comments:  Time: 3 ms (100.00%), Space: 14 MB (46.11%)
Like it? ->Upvote please! \u30C4\n\n\'\'\'\nclass Solution {\npublic:\n    vector prefixesDivBy5(vector& nums) {\n        \n        //initialize a new vector wi
**Like it? ->Upvote please!** \u30C4\n\n\'\'\'\nclass Solution {\npublic:\n    vector<bool> prefixesDivBy5(vector<int>& nums) {\n        \n        //initialize a new vector with boolean values\n        vector<bool> res;\n        int num=0;\n        \n        //loop over the whole array numbers\n        for(int i=0;i<nums.size();i++){\n            /*calculate the current element value added to the last number in the array which is multiplied by 2 as we\'re working with base-2 numbers\n             & save the boolean value into the num variable*/\n            num=(num*2+nums[i])%5;\n            //check if it\'s divisable by 5 or not & insert the resultant boolean value into the new array\n            res.push_back(num==0);\n        }\n        \n        //return the new boolean values array\n        return res;\n    }\n};\n\'\'\'\n\n**Like it? ->Upvote please!** \u30C4\n**If still not understood, feel free to comment. I will help you out**\n**Happy Coding :)**
['Array', 'C', 'C++']