Python Elegant & Short | O(n) | 4 Lines
Complexity\n- Time complexity: O(n)\n- Space complexity: O(n)\n\n# Code\n\nclass Solution:\n    def makeSmallestPalindrome(self, s: str) -> str:\n        letter
# Complexity\n- Time complexity: $$O(n)$$\n- Space complexity: $$O(n)$$\n\n# Code\n```\nclass Solution:\n    def makeSmallestPalindrome(self, s: str) -> str:\n        letters = list(s)\n\n        for i in range(len(s) // 2):\n            letters[i] = letters[~i] = min(letters[i], letters[~i])\n\n        return \'\'.join(letters)\n\n```
['Python', 'Python3']