C++ || Easy Explanation || With Comments || TC - O(N)
\n\n1. Create a string of size n with all \'a\'s in it\n2. Start from end of the created string \n3. Create a variable \'remaining\' and put \'z\' at index i if
\n\n**1. Create a string of size n with all \'a\'s in it\n2. Start from end of the created string \n3. Create a variable \'remaining\' and put \'z\' at index i if remaining>25 (i.e, \'a\'+25 , as a is already there so \'a\'+25 = \'z\'\n4. If remaining becomes less than or equal to 25, put \'a\' + remaining value at that index and break the loop\n5. Return the modified string...**\n\n\n```\nclass Solution {\npublic:\n    string getSmallestString(int n, int k) {\n        \n        string s = "";\n        \n        //Creating string of size n with only \'a\' in it\n        for(int i=0;i<n;i++)\n            s +=\'a\';\n        \n        //Putting i at end index of string "s"\n        int i(n-1);\n        int remaining(k-n);\n        while(remaining>0)\n        {\n            if(remaining<=25)\n            {\n                s[i]=\'a\'+ remaining;\n                break;\n            }\n            else\n            {\n                s[i]=\'a\'+25;\n                remaining -=25;\n                i--;\n            }\n        }\n        return s;\n    }\n};\n```
['Greedy', 'C']