Easy CPP Solution
\n# Code\n\nclass Solution {\npublic:\n    string getSmallestString(string s, int k) {\n        string ans="";\n        int cur=0;\n        int i=0;\n        fo
\n# Code\n```\nclass Solution {\npublic:\n    string getSmallestString(string s, int k) {\n        string ans="";\n        int cur=0;\n        int i=0;\n        for (i=0;i<s.size();i++)\n        {\n            for (int ch=\'a\';ch<=s[i];ch++)\n            {\n                int diff=abs(s[i]-ch);\n                diff=min(diff,26-diff);\n                if (diff<=k) \n                {\n                    ans.push_back(ch);\n                    k-=diff;\n                    break;\n                }\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']