Unexpected TLE  !! Can Anyone Explain
\n\nclass Solution {\npublic:\n    string getSmallestString(int n, int k) {\n        string s = "";\n        for(int i=0; i=0){\n                s[n-i-1] += 25;
```\n\n```class Solution {\npublic:\n    string getSmallestString(int n, int k) {\n        string s = "";\n        for(int i=0; i<n; i++){\n           s = s + \'a\'; \n        }\n        int i=0;\n        int rem = k - n;\n        while(rem!=0){\n            if(rem -25 >=0){\n                s[n-i-1] += 25;\n                rem-=25;\n            }else{\n                s[n-i-1] += rem;\n                rem = 0;\n            }\n            i++;\n        }\n        return s;\n    \n\n    }\n};
[]