| | ✅ Very Simple C++ Solution with 100% Time and Space Complexity ✅ | |
Intuition\nPlease UPVOTE if you LIKE the Solution and COMMENT your own Code and thoughts.\n\n# Approach\nThese Type of Questions are Solved using Two pointers,\
# Intuition\nPlease UPVOTE if you LIKE the Solution and COMMENT your own Code and thoughts.\n\n# Approach\nThese Type of Questions are Solved using Two pointers,\nOne from Starting index i=0 and other from end r=size of string -1.\n\n# Complexity\n- Time complexity:\n100%\n\n- Space complexity:\n100%\n\n# Code\n```\nclass Solution {\npublic:\n    string makeSmallestPalindrome(string s) {\n        int i=0,r=s.size()-1;\n        while(i<r)\n        {\n            if(s[i]!=s[r])\n            {\n                s[i]=s[r]=(s[i]<s[r])?s[i]:s[r];\n            }\n            i++;\n            r--;\n        }\n        return s;\n    }\n};\n```
['C++']