JavaScript solution beats 100%
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n$$O(n)$$ \n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n**69 ms, beats 91%**\n```\n/**\n * @param {string} s\n * @param {number} k\n * @param {character} fill\n * @return {string[]}\n */\n var divideString = function(s, k, fill) {\n    const res = []\n     let temp = \'\'\n     let len = 0\n     if(s.length % k === 0){\n         len = s.length\n    }else{\n         len = s.length + k-(s.length%k)\n     }\n     for(let i= 0; i<len; i++){\n         temp += s[i] || fill\n         if(temp.length === k){\n             res.push(temp)\n             temp= ""\n         }\n     }\n     return res\n };\n```\n//\n# Complexity\n- Time complexity:\n $$O(n/3)$$ \n\n**54 ms, beats 100%**\n```\nvar divideString = function(s, k, fill) {\n    const res = []\n    s= s.length % k === 0 ? s : s+ fill.repeat(k-(s.length%k))\n    let a = 0\n    b = k\n    for(let i= a; i<s.length; i+= k){\n        res.push(s.slice(a,b))\n        a+= k\n        b+= k\n    }\n    return res\n};\n```\n**Plz upvote if it was helpful**
['JavaScript']