Python 3   ||   4 lines,  w/ explanation an example  ||   T/S: 58% / 72%
\nclass Solution:\n    def makeSmallestPalindrome(self, s: str) -> str:    #  Example: s = \'sdnvnfe\'\n\n        ans, n = list(s), len(s)                      
```\nclass Solution:\n    def makeSmallestPalindrome(self, s: str) -> str:    #  Example: s = \'sdnvnfe\'\n\n        ans, n = list(s), len(s)                        # n = 7 ,  n//2 = 3\n                                                        #         ans = [s, d, n, v, n, f, e]\n        for i in range(n//2): \n                                                        #  i = 0: ans = [|e| ,d,n,v,n,f, |e|]\n            ans[i]=ans[n-i-1] = min(ans[i],ans[n-i-1])  #  i = 1: ans = [e,|d|, n,v,n, |d|,e] \n                                                        #  i = 2: ans = [e,d,|n|, v, |n|,d,e]\n     \n        return \'\'.join(ans)                             #  return ().join([e,d,n,v,n,d,e]) = \'ednvnde\'\n```\n[https://leetcode.com/problems/lexicographically-smallest-palindrome/submissions/1294942680/](https://leetcode.com/problems/lexicographically-smallest-palindrome/submissions/1294942680/)\n\nI could be wrong, but I think that time complexity is *O*(*N*) and space complexity is *O*(*N*), in which *N* ~`len(s)`.\n
['Python3']