Java Greedy soln
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 {\n    /**\n    We greedily make every character as \'a\' if possible.\n    This can be done in 2 ways, current character could be close to \'a\'\n    like \'b\' or \'z\' as its circular. So we can check left and right diffs from \'a\'\n    If not, we just make current character small by remaining k.\n     */\n    public String getSmallestString(String s, int k) {\n        char[] arr = s.toCharArray();\n        \n        for (int i = 0; i < s.length(); i++) {\n            char ch = arr[i];\n            int leftDiff = ch - \'a\';\n            int rightDiff = \'z\' - ch + 1;\n            int minDiff = Math.min(leftDiff, rightDiff);\n\n            if (k - minDiff >= 0) {\n                k -= minDiff;\n                arr[i] = \'a\';\n            } else {\n                arr[i] = (char) (ch - k);\n                k = 0;\n            }\n        }\n\n        return new String(arr);\n    }\n}\n```
['Java']