Easier way to solve this problem
ApproachFor all mirror-symmetric elements in the string, select the smaller one and use it as a replacement for both.
For example, given the string "abcd", we w
# Approach
<!-- Describe your approach to solving the problem. -->
For all mirror-symmetric elements in the string, select the smaller one and use it as a replacement for both.

> For example, given the string "abcd", we will first compare 'a' and 'd', as they are closest to the beginning and end of the string. Since 'a' is smaller than 'd', we replace 'd' with 'a'.


---


# 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
```cpp []
class Solution {
public:
    string makeSmallestPalindrome(string s) {
        int n = s.size();
        for(int i = 0; i< (n>>1); i++){
            s[i] = min(s[i], s[n-i-1]);
            s[n-i-1] = s[i];
        }
        return s;
    }
};
```
['C++']