Easy to understand with comments
we start from the back , keep adding the highest letter possible to the result , highest possible letter is k-(remaining spaces)(remaining as we subtract the va
we start from the back , keep adding the highest letter possible to the result , highest possible letter is k-(remaining spaces)(remaining as we subtract the value of k by the value of each letter added, the remaining spaces are n - current length of result)\n```\ndef getSmallestString(self, n: int, k: int) -> str:\n        l=[]\n        count=0\n        for i in range(n):\n            # check if we can put \'z\'  \n            if k-26>((n-2)-i):           \n                l.append(chr(26+96))\n                k=k-26\n            # if we cant we put highest possible letter and put a\'s after it\n            else:\n                l.append(chr(k-(n-1-i)+96))\n                break\n        while len(l)!=n:\n            l.append(chr(97))\n        return ("".join(l))[::-1]\n\'\'\'
['Greedy', 'Python', 'Python3']