JAVA | One pass
Solution:\n\nclass Solution {\n    public String makeSmallestPalindrome(String s) {\n        int n = s.length();\n        StringBuilder sb = new StringBuilder()
# Solution:\n```\nclass Solution {\n    public String makeSmallestPalindrome(String s) {\n        int n = s.length();\n        StringBuilder sb = new StringBuilder();\n        for (int i = 0; i < n; i++) {\n            sb.append((char) Math.min(s.charAt(i), s.charAt(n - i - 1)));\n        }\n        return sb.toString();\n    }\n}\n```\n### Time complexity: $$O(n)$$
['String', 'Java']