Python - very easy to follow - O(N) - Char Dict
\n\ndef getSmallestString(self, n: int, k: int) -> str:\n\tc_dict = {i+1: chr(ord(\'a\') + i) for i in range(26)}  # {1:\'a\', 2:\'b\' ... 26:\'z\'}\n\n\tlst = 
\n```\ndef getSmallestString(self, n: int, k: int) -> str:\n\tc_dict = {i+1: chr(ord(\'a\') + i) for i in range(26)}  # {1:\'a\', 2:\'b\' ... 26:\'z\'}\n\n\tlst = [\'\']*n\n        \n\tfor i in range(n-1, -1, -1): # Reverse fill\n\t\tc = min(26, k-i)         # if k-i > 26, character is \'z\' else c_dict[k-i]\n\t\tlst[i] = c_dict[c]\n\t\tk -= c\n\n\treturn \'\'.join(lst)\n```
[]