Java, beats 83.93%, 6ms
IntuitionIf we have two pointer moving inward from both ends when we encounter different characters, we choose the smaller of the two.Complexity
Time complexity
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
If we have two pointer moving inward from both ends when we encounter different characters, we choose the smaller of the two.

# Complexity
- Time complexity:$$O(n)$$
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:$$O(1)$$
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```java []
class Solution {
    public String makeSmallestPalindrome(String s) {
        char[] arr = s.toCharArray();
        int i = 0;
        int j = arr.length - 1;

        while(i <= j) {
            if((int) arr[i] < (int) arr[j]) {
                arr[j] = arr[i];
            }else {
                arr[i] = arr[j];
            }

            i++;
            j--;
        }

        return new String(arr);
    }
}
```
['Java']