C++ || TWO POINTER || EASY TO UNDERSTAND
\n# Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(1)\n\n# Code\n\n// <!-- UPVOTE IF THIS CODE IS HELP FULL FOR YOU\n// IF ANY SUGGETION YOU CAN
\n# Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(1)\n\n# Code\n```\n// <!-- UPVOTE IF THIS CODE IS HELP FULL FOR YOU\n// IF ANY SUGGETION YOU CAN COMMENT HERE. -->\nclass Solution {\npublic:\n    string makeSmallestPalindrome(string s) {\n        int i = 0, j = s.length()-1;//make pointer index\n        while(i<j){\n            if(s[i] != s[j]){\n                s[i] = s[j] = min(s[i],s[j]);//initialise i and j to min of (s[i],s[j]);\n            }\n            i++;j--;\n        }\n        return s;\n    }\n};\n```
['Two Pointers', 'C++']