Java | Easy to understand
\nclass Solution {\n    public String digitSum(String s, int k) {\n        while(s.length() > k){\n            String str = "";\n            for(int i=0; i<s.le
```\nclass Solution {\n    public String digitSum(String s, int k) {\n        while(s.length() > k){\n            String str = "";\n            for(int i=0; i<s.length(); i=i+k){\n                int sum = 0;\n                for(int j=i; j<s.length() && j<i+k ; j++)\n                    sum += Character.getNumericValue(s.charAt(j));\n                str += String.valueOf(sum);\n            }\n            s = str;\n        }\n        return s;\n    }\n}\n```
['Iterator', 'Java']