C++ || Basic approach || Easy to understand
\nvector<string> divideString(string s, int k, char fill) {\n        vector<string>ans;\n        bool flag=false;\n        int i;\n        for( i=0;i<s.length()
```\nvector<string> divideString(string s, int k, char fill) {\n        vector<string>ans;\n        bool flag=false;\n        int i;\n        for( i=0;i<s.length();i+=k){\n            if(i+k-1<s.length()){\n                ans.push_back(s.substr(i,k));\n            }else{\n                flag=true;\n                break;\n            }\n        }\n        string temp;\n        if(flag){\n             temp=s.substr(i,k);\n            int res=k-temp.length();\n            while(res){\n                temp+=fill;\n                res--;\n            }\n             ans.push_back(temp);\n        }\n        return ans;\n        \n    }\n```
[]