Weekly Contest 276 Q1
\nclass Solution {\npublic:\n    vector<string> divideString(string s, int k, char fill) {\n        vector <string> v;\n        string str;\n        int index=0
```\nclass Solution {\npublic:\n    vector<string> divideString(string s, int k, char fill) {\n        vector <string> v;\n        string str;\n        int index=0;\n        for(auto &it:s)\n        {\n            str.push_back(it);\n            index++;\n            if(index==k)\n            {\n                v.push_back(str);\n                str=""; index=0;\n            }\n        }\n        if(str.size() < k && str.size()!=0)\n        {\n            for(int i=str.size();i<k;++i)\n                str.push_back(fill);\n            v.push_back(str);\n        }\n        return v;\n    }\n};\n```
[]