1328. Break a Palindrome
Medium
Input: palindrome = "abccba"
Output:
"aaccba"
Explanation:
There are many ways to make "abccba" not a palindrome, such as "zbccba", "aaccba", and "abacba".
Of all the ways, "aaccba" is the lexicographically smallest.Input: palindrome = "a"
Output:
""
Explanation:
There is no way to replace a single character to make "a" not a palindrome, so return an empty string.Last updated