Simple Java Solution
Beats 100%\n\n# Code\n\nclass Solution {\n    public String getSmallestString(String s, int k) {\n        if(k==0) return s;\n        StringBuilder sb=new Strin
Beats 100%\n\n# Code\n```\nclass Solution {\n    public String getSmallestString(String s, int k) {\n        if(k==0) return s;\n        StringBuilder sb=new StringBuilder();\n        int i=0;\n        for(i=0;i<s.length();i++){\n            if(k==0) break;\n            int c=s.charAt(i)-\'a\';\n            if(c>13) c=26-c;\n            if(c<=k){\n                sb.append(\'a\');\n                k-=c;\n            }\n            else{\n                sb.append((char)(s.charAt(i)-k));\n                k=0;\n            }\n        }\n        while(i<s.length()){\n            sb.append(s.charAt(i++));\n        }\n        return sb.toString();\n    }\n}\n```
['String', 'Java']