EASY C++ || GREEDY || STRING
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    string getSmallestString(string s, int k) {\n        string ans = "";\n        for(int i = 0; i < s.size(); i++)\n        {\n            int d1 = s[i] - \'a\';\n            int d2 = \'z\' - s[i];\n\n            if(d1 < d2 + 1)\n            {\n                if(d1 <= k)\n                {\n                    ans += \'a\';\n                    k = k - d1;\n                }\n                else{\n                    ans += s[i] - k;\n                    k = 0;\n                }\n                \n            }\n            else\n            {\n                if(d2  + 1 <= k)\n                {\n                    ans += \'a\';\n                    k = k - d2 - 1;\n                }\n                else{\n                    ans += s[i] - k;\n                    k = 0;\n                }\n\n            }\n        }\n        return ans;\n    }\n};\n```
['String', 'Greedy', 'C++']