Break Palindrome [C++]
Hint 1 : Length of string == 1, return ""\nH2: Palindrome string is lexicographical, so return first non \'a\' by \'a\' to break sequence.\n\n100% accpeted solu
Hint 1 : Length of string == 1, return ""\nH2: Palindrome string is lexicographical, so return first non \'a\' by \'a\' to break sequence.\n\n100% accpeted solution.\n\n```\nstring breakPalindrome(string p) {\n        \n        size_t sz = p.size();\n        if (sz <= 1) return "";\n        \n        for (size_t i=0; i < sz/2; i++) {\n            if (p[i] > \'a\')  {\n                p[i] = \'a\';\n                return p;\n            }\n        }\n        \n        p[sz-1] = \'b\';\n        return p;\n    }\n```
[]