How I understood - python3 Solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n1. Change each letter t
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n1. Change each letter to prev unless it is an a. In this case if you are going to change "a" to "z" -> resulting output will not be lexicographicallly smaller.\n\n2. If you did not end up changing any letter, change last one to "z" -> You should change at least 1 (Req)\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:\n    def smallestString(self, s: str) -> str:\n        #Length of s?\n        count = 0\n\n        arr = [char for char in s]\n\n        for i in range(len(arr)):\n            if arr[i] > "a":\n                arr[i] = chr(ord(arr[i]) - 1)  # Change to previous letter\n                count += 1\n            elif count:\n                break\n\n        if count == 0:\n            arr[len(s)-1] = "z"\n\n        return "".join(arr)\n        \n```
['Python3']