C++ 12 line solution with Recursion
\n\nclass Solution {\npublic:\n    string digitSum(string s, int k) {\n        if(s.size() <= k)\n            return s;\n        string digits;\n        for(int
\n```\nclass Solution {\npublic:\n    string digitSum(string s, int k) {\n        if(s.size() <= k)\n            return s;\n        string digits;\n        for(int i = 0; i < s.size(); i += k){\n            string window = s.substr(i,k);\n            int sum = 0;\n            for(char i : window){\n               sum += i - \'0\'; \n            }\n            digits += to_string(sum);\n        }\n        return digitSum(digits,k);\n    }\n};\n```
['Recursion', 'C']