Golang simple O(n) solution
Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(n)\n\n# Code\ngo\nfunc getSmallestString(s string, k int) string {\n\t// abcdefghijklm\n\t// nopq
# Complexity\n- Time complexity:\n$$O(n)$$\n\n- Space complexity:\n$$O(n)$$\n\n# Code\n```go\nfunc getSmallestString(s string, k int) string {\n\t// abcdefghijklm\n\t// nopqrstuvwxyz\n\tsb := strings.Builder{}\n\tfor _, v := range s {\n\t\tif k == 0 {\n\t\t\tsb.WriteRune(v)\n            continue\n\t\t}\n\t\tstep2a := 0\n\t\tif v <= \'m\' {\n\t\t\tstep2a = int(v - \'a\')\n\t\t} else {\n\t\t\tstep2a = int(\'z\' - v + 1)\n\t\t}\n\t\tif k >= step2a {\n\t\t\tsb.WriteRune(\'a\')\n\t\t\tk -= step2a\n\t\t\tcontinue\n\t\t}\n\t\tsb.WriteRune(v - rune(k))\n        k = 0\n\t}\n\treturn sb.String()\n}\n```
['Go']