Java| O(n) | 100% faster
\nclass Solution {\n    public String[] divideString(String s, int k, char fill) {\n        int n=s.length();\n        int toFill= n%k==0?0:(k-n%k);\n        St
```\nclass Solution {\n    public String[] divideString(String s, int k, char fill) {\n        int n=s.length();\n        int toFill= n%k==0?0:(k-n%k);\n        StringBuilder sb = new StringBuilder(s);\n        \n        while(toFill-->0){\n            sb.append(fill);\n        }\n        String[] ans=new String[sb.length()/k];\n        \n        \n        for(int i=0;i<ans.length;i++){\n            ans[i]=sb.substring(k*i,k*i+k);\n        }\n        return ans;\n    }\n}\n```
['Java']