You will love it || Java || Simple Solution || Well Commented
Very Easy Solution. I have commented all steps.\n\nclass Solution {\n    public String getSmallestString(int n, int k) {\n        char[] ch = new char[n]; // In
Very Easy Solution. I have commented all steps.\n```\nclass Solution {\n    public String getSmallestString(int n, int k) {\n        char[] ch = new char[n]; // Initially taking a character array and later we will convert it to String.\n        int i=0;\n        for(;i<n;i++){\n            ch[i] = \'a\'; // Initially keeping all characters as \'a\' bcoz we need to use all n places of the string.\n        }\n        i--; //for keeping track of i. Here it is n-1;\n        k = k-n; // after setting initially keeping all as \'a\' so we have k-n values left.\n        while(k>0){\n            if(k>25){ //if leftover value of k is more than 25, we add it to the current i\'th index since we can\'t cross 26 for a particular index.\n                ch[i] += 25;\n                i--; //now going to the next index;\n                k-=25; //and decreasing value of k as well since we used 25 for last index.\n            }\n            else{\n                ch[i]+=k; // if k is < 25 then we simply add it to the present index and end the loop\n                k=0; //by setting k value to 0.\n            }\n        }\n        return String.copyValueOf(ch); //converting char array to String.\n    }\n}\n```
['String', 'Greedy', 'Java']