easy to understand c++ code
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    string smallestString(string s) {\n       int l=-1,r=-1;\n       for(int i=0;i<s.size();i++)\n       {\n            if(s[i]!=\'a\')\n            {\n                l=i;\n                break;\n            }\n       }\n       if(l==-1)\n       {\n            int n=s.size();\n            s[n-1]=\'z\';\n            return s;\n       } \n\n        int ll=l;\n        while(ll<s.size())\n        {\n            if(s[ll]!=\'a\')\n            {\n                ll++;\n            }\n            else\n            {\n                break;\n            }\n        }\n        r=ll-1;\n\n        for(int i=l;i<=r;i++)\n        {\n            s[i]=s[i]-1;\n        }\n\n        return s;\n    }\n};\n```
['String', 'C++']