JAVA Easy SOlution || 100 Faster
\n- Time complexity: O(n)\n\n- Space complexity: O(n)\n\n\nclass Solution {\n    public String makeSmallestPalindrome(String s) {\n     \n       char []ch=s.toC
\n- Time complexity: O(n)\n\n- Space complexity: O(n)\n\n```\nclass Solution {\n    public String makeSmallestPalindrome(String s) {\n     \n       char []ch=s.toCharArray();\n       \n        int i=0;\n        int j=s.length()-1;\n        while(i<=j)\n        {\n            if(ch[i]<ch[j])ch[j]=ch[i];\n            else if(ch[i]>ch[j])ch[i]=ch[j];\n            i++;\n            j--;\n        }\n        StringBuilder S=new StringBuilder();\n        for(char c:ch) S.append(c);\n        \n        return S.toString();\n    }\n}\n```
['Java']