Easy Solution
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```javascript []
/**
 * @param {string} s
 * @param {number} k
 * @return {string}
 */
var getSmallestString = function(s, k) {
    let res = "";
    let ach = "a".charCodeAt(0);
    let zch = "z".charCodeAt(0);
    for (let i = 0; i < s.length; ++i) {
        let ch = s.charCodeAt(i);
        if (ch == ach || k <= 0) {
            res += s[i];
            continue;
        }
        const d = Math.min(Math.abs(ch-ach), zch + 1 - ch);
        if (d <= k) {
            k -= d;
            res += "a";
        } else {
            res += String.fromCharCode(ch - k);
            k = 0;
        }
    }
    return res;
};
```
['JavaScript']