[JAVA] easy solution 95% faster
\n\n# Approach\n Describe your approach to solving the problem. \nJust check whether elements are equal in the first half and second half of the string. If not 
\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nJust check whether elements are equal in the first half and second half of the string. If not then change lexicographically bigger characters one to smaller ones.\n\n# Complexity\n- Time complexity: O(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public String makeSmallestPalindrome(String s) {\n       var c = s.toCharArray();\n       int i = 0, j = c.length - 1;\n\n       while(i < j) {\n           if(c[i] < c[j])\n              c[j --] = c[i ++];\n           else\n              c[i ++] = c[j --];\n       } \n       return new String(c);\n    }\n}\n```\n# PLEASE UPVOTE IF IT WAS HELPFULL
['Two Pointers', 'String', 'Java']