Java || O(n)
java []\nclass Solution {\n    public String makeSmallestPalindrome(String s) {\n        int i=0;\n        int j=s.length()-1;\n        char[] arr = s.toCharArr
``` java []\nclass Solution {\n    public String makeSmallestPalindrome(String s) {\n        int i=0;\n        int j=s.length()-1;\n        char[] arr = s.toCharArray();\n        while(i<=j){\n            if(arr[i]!=arr[j]){\n                arr[i] = arr[j] = (char) Math.min(arr[i],arr[j]);\n            }\n            i++;\n            j--;\n        }\n        return new String(arr);\n    }\n}\n```
['Java']