Optimized simple solution - beats 83.59%🔥
IntuitionApproachComplexity

Time complexity: O(N)


Space complexity: O(N)

Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity: O(N)

- Space complexity: O(N)

# Code
```java []
class Solution {
    public String makeSmallestPalindrome(String s) {
        char[] t = s.toCharArray();
        int i = 0;
        int j = t.length - 1;
        while (i < j) {
            if (t[i] < t[j]) {
                t[j] = t[i];
            } else if (t[i] > t[j]) {
                t[i] = t[j];
            }
            i++;
            j--;
        }
        return new String(t);
    }
}
```
['Java']