C++|| easy to understand || with comments || greedy
\nstring getSmallestString(int n, int k) {\n        string ans="";\n        for(int i=0;i<n;i++)\n        {\n        //for getting the lexicographically smalles
```\nstring getSmallestString(int n, int k) {\n        string ans="";\n        for(int i=0;i<n;i++)\n        {\n        //for getting the lexicographically smallest string\n            ans+=\'a\';\n        }\n        k=k-n;\n        int j=n-1;\n        while(k!=0 && j>=0)\n        {\n//            as we have added a now when ever we replace a we need to add an extra 1 as a=1\n            k=k+1;\n            \n            int m=k%26;\n            int p=k/26;\n//             if element have k>26 than we can add a z in the end replacing it by a\n            if(p>=1)\n            {\n                ans[j]=\'z\';\n                k=k-26;\n                \n            }\n//             if j<26 now we cn hust replace it by one char \n            else{\n                cout<<m<<" ";\n                ans[j]=char(m+97-1);\n                k=k-m;\n            }\n            j--;\n            \n        }\n        \n        return ans;\n    }\n```
['Greedy', 'C']