Java 100% Faster Solution
Code\n\nclass Solution {\n    public String reverseStr(String s, int k) {\n        StringBuilder sb = new StringBuilder();\n        while (s.length() >= 2 * k) 
# Code\n```\nclass Solution {\n    public String reverseStr(String s, int k) {\n        StringBuilder sb = new StringBuilder();\n        while (s.length() >= 2 * k) {\n            String temp = s.substring(0, k);\n            sb.append(new StringBuilder(temp).reverse());\n            sb.append(s.substring(k, 2 * k));\n            s = s.substring(2 * k);\n        }\n        if (s.length() <= k) {\n            sb.append(new StringBuilder(s).reverse());\n        } else {\n            sb.append(new StringBuilder(s.substring(0, k)).reverse());\n            sb.append(s.substring(k));\n        }\n        return sb.toString();\n    }\n}\n```
['Java']