✅ Java Solution
CODE\nJava []\npublic String getSmallestString(String s, int k) {\n\tStringBuffer res = new StringBuffer("");\n\tchar arr[] = s.toCharArray();\n\tint i=0, n=arr
## **CODE**\n```Java []\npublic String getSmallestString(String s, int k) {\n\tStringBuffer res = new StringBuffer("");\n\tchar arr[] = s.toCharArray();\n\tint i=0, n=arr.length;\n\n\twhile(k > 0 && i<n){\n\t\tint id = (arr[i++]-\'a\');\n\t\tint min = Math.min(id, 26-id);\n\n\t\tif(min <= k) {\n\t\t\tres.append(\'a\');\n\t\t\tk -= min;\n\t\t} else {\n\t\t\tid -= k;\n\t\t\tres.append((char)(id+\'a\'));\n\t\t\tbreak;\n\t\t}\n\t}\n\n\twhile(i < n){\n\t\tres.append(arr[i++]);\n\t}\n\n\treturn res.toString();\n}\n```
['Java']