Easy Concise C++ O(n) Solution(Faster than 99%)
class Solution {\npublic:\n    string getSmallestString(int n, int k) {\n     int curr=1;\n     string ans="";   \n        for(int i=1;i<=n;i++){\n          if(
class Solution {\npublic:\n    string getSmallestString(int n, int k) {\n     int curr=1;\n     string ans="";   \n        for(int i=1;i<=n;i++){\n          if((k-curr)< 26*(n-i)){\n            ans+=char(\'a\'+curr-1);\n              k-=curr;\n          }\n          else{\n              while((k-curr)>26*(n-i))\n                  curr++;\n              ans+=char(\'a\'+curr-1);\n              k-=curr;\n              }}\n        return ans;\n    }};
['Greedy', 'C']