C naive solution- faster than 100%- explained
\'\'\'\n\n\nchar * digitSum(char * s, int k){\n    \n\t\t//base case\n\t\tif (strlen(s) <= k)\n\t\t\treturn s;\n\n\t\t//iterate through s using sPtr\n\t\tint j 
\'\'\'\n\n\nchar * digitSum(char * s, int k){\n    \n\t\t//base case\n\t\tif (strlen(s) <= k)\n\t\t\treturn s;\n\n\t\t//iterate through s using sPtr\n\t\tint j = 0;\n\t\tchar *sPtr = s;\n\t\twhile (*sPtr != \'\\0\')\n\t\t{\n\t\t\tint sum = 0;\n\n\t\t\t//calculating the sum of groups of k\n\t\t\tfor (int i = 0; (i < k) && (*sPtr!=\'\\0\'); i++)\n\t\t\t{\n\t\t\t\tsum += *sPtr - \'0\';\n\t\t\t\tsPtr++;\n\t\t\t}\n\n\t\t\t//if sum is more than one digit, the sum is casted to a string and read in reverse\n\t\t\tif (sum > 9)\n\t\t\t{\n\t\t\t\tint i = 0;\n\t\t\t\tchar s1[k];\n\t\t\t\twhile (sum != 0)\n\t\t\t\t{\n\t\t\t\t\ts1[i++] = sum%10 + \'0\';\n\t\t\t\t\tsum /= 10;\n\t\t\t\t}\n\t\t\t\ti--;\n\t\t\t\tchar *ptr = s1 + i;\n\t\t\t\twhile (i >= 0)\n\t\t\t\t{\n\t\t\t\t\ts[j++] = s1[i--];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse\n\t\t\t\ts[j++] = sum + \'0\';\n\n\t\t}\n\t\ts[j] = \'\\0\';\n\n\t\t//recursive call for the new s\n\t\treturn digitSum(s, k);\n}\'\'\'
['C']