Easy Java Solution ( 0 ms time complexity)
Intuition\ndivide, replace , merge\n\n# Approach\neasy\n\n# Complexity\n- Time complexity:\n0ms\n\n\n\n# Code\njava []\nclass Solution {\n    public String digi
# Intuition\n**divide, replace , merge**\n\n# Approach\neasy\n\n# Complexity\n*- Time complexity:\n0ms*\n\n\n\n# Code\n```java []\nclass Solution {\n    public String digitSum(String s, int k) {\n        \n        while(s.length()>k)\n            s = makeParts(s,k);\n        return s;\n    }\n\n    public String makeParts(String s,int k){\n        int n = s.length();\n        StringBuilder sb = new StringBuilder();\n        int i = 0;\n        while(i<n){\n            int cnt = 0;\n            int sum = 0;\n            while(cnt<k && i<n){\n                sum+=s.charAt(i)-\'0\';\n                i++;\n                cnt++;\n            }\n            sb.append(sum);\n        }\n        return sb.toString();\n    }\n\n    \n}\n```
['String', 'Simulation', 'Java']