Easy to understand || 100% faster
Time complexity:\n Add your time complexity here, e.g. O(n) \nO(n)\n- Space complexity:\n Add your space complexity here, e.g. O(n) \nUsing Constant space \n# C
- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(n)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nUsing Constant space \n# Code\n```\nclass Solution {\npublic:\n    string breakPalindrome(string palindrome) {\n        int len = palindrome.size();\n        if(len == 1){\n            return "";\n        }\n        for(int i=0; i<len/2; i++){\n            if(palindrome[i] != \'a\'){\n                palindrome[i] = \'a\';\n                return palindrome;\n            }\n        }\n        palindrome[len-1] = \'b\';\n        return palindrome;\n    }\n};\n```
['Brainteaser', 'C++']