Java || Easy || Efficient || With Explanation
\nclass Solution {\n    public String[] divideString(String s, int k, char fill) {\n        int rem = 0;\n        if( s.length() % k != 0){\n             rem = 
```\nclass Solution {\n    public String[] divideString(String s, int k, char fill) {\n        int rem = 0;\n        if( s.length() % k != 0){\n             rem = k - s.length() % k; //counting the total positions where we have to fill the char "fill".\n        }\n        for(int i = 0; i < rem; i++){\n            s = s+fill; //appending the char to the String\n        }\n        \n        String[] strs = new String[s.length()/k];  //the length will be String length / K because we are making pair of k length Strings.\n        int index = 0;  //index for array.\n        for(int i = 0; i < s.length(); i+=k){\n            strs[index] = s.substring(i, i+k); //substing of  current element to Kth element. \n            index++;\n        }\n        return strs;\n    }\n}\n```\nPlease **UPVOTE** if you find this solution helpful.\nHappy Coding : )
['Java']