JAVA SOLUTION RECURSION 🦘
\nclass Solution {\n    public String digitSum(String s, int k) {\n        return s.length() > k ? digitSum(new StringBuilder(s), k) : s;\n    }\n\n    public S
```\nclass Solution {\n    public String digitSum(String s, int k) {\n        return s.length() > k ? digitSum(new StringBuilder(s), k) : s;\n    }\n\n    public String digitSum(StringBuilder numbers, int k) {\n        StringBuilder res = new StringBuilder(numbers.length() / k + 1);\n        for (int i = 0, loop = 0, sum = 0; i < numbers.length(); i++) {\n            sum += numbers.charAt(i) - \'0\';\n            if (++loop == k || numbers.length() - 1 == i) {\n                res.append(sum);\n                sum = 0;\n                loop = 0;\n            }\n        }\n        return res.length() > k ? digitSum(res, k) : res.toString();\n    }\n}\n```
['String', 'Recursion', 'Java']