C++ greedy string
Make this faster by doing it in place. Greedily increment with a budget (in this case the "distance").Code
Make this faster by doing it in place. Greedily increment with a budget (in this case the "distance"). 

# Code
```cpp []
class Solution {
public:

    string getSmallestString(string s, int k) {
        
        // this means, throughout this string we need to find the letter that can substitute the letter in the original string, and still keep the distance below k. greedy?
        
        for (int i = 0; i < s.size() && k > 0; i += 1) {
            // greedily try to change this letter to "a" via moving forward or backwards
            int min_moves_to_a = min('z' - s[i] + 1, s[i] - 'a');
            if (min_moves_to_a <= k) {
                s[i] = 'a';
                k -= min_moves_to_a;
            }

            // not enough to, just sink this letter straight down
            else {
                s[i] -= k;
                return s;
            }
        }        
        return s;
    }
};
```
['C++']