97 ms
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(object):\n    def makeSmallestPalindrome(self, s):\n        """\n        :type s: str\n        :rtype: str\n        """\n        s = list(s)\n        l = len(s)\n        for i in range(l // 2):\n            a = s[i]\n            b = s[l-1-i]\n\n            if ord(a) >= ord(b):\n                s[i] = b\n            else:\n                s[l-1-i] = a\n        return "".join(s)\n```
['Python']