Simple Java Code using 2 pointer
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)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

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

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