Simple Two Pointer Solution | Java
Approach: Take two pointers one at 0 index other at last-1 at each iteration replace the large character with smaller one in stringbuilder return the string at 
**Approach:** Take two pointers one at 0 index other at last-1 at each iteration replace the large character with smaller one in stringbuilder return the string at last.\n```\nclass Solution {\n    public String makeSmallestPalindrome(String s) {\n        StringBuilder sb = new StringBuilder(s);\n        int f=0,l=s.length()-1;\n        while(f<l){\n            if(s.charAt(f)>s.charAt(l)){\n              sb.replace(f,f+1,s.charAt(l)+"");  \n            }\n            else sb.replace(l,l+1,s.charAt(f)+"");\n            f++;\n            l--;\n        }\n        return sb.toString();\n    }\n}
['Java']