A unqiue solution to the problem
\n\nclass Solution {\npublic:\n    vector divideString(string s, int k, char fill) {\n        vector a;\n        int n=s.size();\n        string store="";\n    
```\n\n```class Solution {\npublic:\n    vector<string> divideString(string s, int k, char fill) {\n        vector<string> a;\n        int n=s.size();\n        string store="";\n        int mod=n%k;\n        int i=0;\n        int q=n/k;//finding quotient of the size of string divided by k\n        int fill_size=((q+1)*k-n);//for finding the fill size if the modulus with n is not 0\n        cout<<fill_size<<endl;\n        // string f=fill;\n        if(mod!=0)\n        {\n            s=s.append(fill_size,fill);\n        } \n        cout<<s<<endl;\n        int start=0;\n        while(start<n)\n        {\n            cout<<start<<" "<<start+k<<endl;\n             store=s.substr(start,k);//for extracting and storing the substring\n            cout<<store<<endl;\n            a.push_back(store);\n            store="";\n            start=start+k;\n        }\n       \n        return a;\n    }\n};
['String', 'C++']