MOST SIMPLE || C++
if this code helpful for you, please upvote that\'s more help full for me.\n# Code\n\nclass Solution {\npublic:\n    string smallestString(string s) {\n        
# if this code helpful for you, please upvote that\'s more help full for me.\n# Code\n```\nclass Solution {\npublic:\n    string smallestString(string s) {\n        int i = 0, n = s.length();\n        while(i<n && s[i]==\'a\')i++;\n        if(i==n){\n            s[n-1] = \'z\';\n            return s;\n        }\n        while(i<n && s[i] != \'a\'){\n            s[i]--;\n            i++;\n        }\n        return s;\n    }\n};\n```
['C++']