Simple java code 5 ms beats 100 %
\n# Complexity\n- \n\n# Code\n\nclass Solution {\n    public String makeSmallestPalindrome(String s) {\n        int l = 0;\n        int r = s.length() - 1;\n   
\n# Complexity\n- \n![image.png](https://assets.leetcode.com/users/images/72380c05-0fea-4248-8e3a-84ce7ef3b1b3_1706713762.7482114.png)\n# Code\n```\nclass Solution {\n    public String makeSmallestPalindrome(String s) {\n        int l = 0;\n        int r = s.length() - 1;\n        char[] arr = s.toCharArray();\n        while (l < r) {\n            if (arr[l] != arr[r]) {\n                arr[r] = arr[l] = (char) Math.min(arr[l], arr[r]);\n            }\n            l++;\n            r--;\n        }\n        return new String(arr);\n    }\n}\n```
['Two Pointers', 'String', 'Java']