c++ solution || easy to understand
Code\n\nclass Solution {\npublic:\n    string makeSmallestPalindrome(string s) {\n        int left = 0;\n        int right = s.length() - 1;\n\n        while (l
# Code\n```\nclass Solution {\npublic:\n    string makeSmallestPalindrome(string s) {\n        int left = 0;\n        int right = s.length() - 1;\n\n        while (left < right) {\n            if (s[left] != s[right]) {\n                string modified1 = s;\n                modified1[right] = s[left];\n\n                std::string modified2 = s;\n                modified2[left] = s[right];\n\n                if (modified1 < modified2) {\n                    s = modified1;\n                } else {\n                    s = modified2;\n                }\n            }\n\n            left++;\n            right--;\n        }\n\n        return s;\n    }\n};\n\n\n```
['C++']