simple if else
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: O(N)\n\n- Space complexity: O(1)\n\n# Code\n```\nclass Solution {\npublic:\n    string getSmallestString(string s, int k) \n    {\n        string ans="";\n\n        if(k==0)\n        return s;\n\n        for(int i=0;i<s.length();i++)\n        {        \n            int x=s[i]-\'a\';\n            int y=\'z\'-s[i]+1;\n            if(k==0)\n            {\n               ans.push_back(s[i]);\n            }\n\n            else if(x<y)\n            {\n                if(x>=k)\n                {\n                    ans.push_back(char((int)s[i]-k));\n                    k=0;\n\n                }else\n                {\n                    ans.push_back(\'a\');\n                    k=k-x;\n                }\n            } \n            else\n            {\n                if(y>k)\n                {\n                     ans.push_back(char((int)s[i]-k));\n                    k=0;\n                }\n                else\n                {\n                    ans.push_back(\'a\');\n                    k=k-y;\n                }\n            }        \n        }\n        return ans;\n    }\n};\n```
['C++']