Tap here to switch tabs
Problem
Submissions

Problem: Break a Palindrome

med
30 min
Try to solve the Break a Palindrome problem.

Statement

Given a palindromic string of lowercase English letters palindrome, replace exactly 11 character with any lowercase English letter such that the resulting string is not a palindrome and is the lexicographically smallest possible string.

Return the resulting string. If it is impossible to replace a single character to make the string not a palindrome, return an empty string "".

Constraints:

  • 1≤1 \leq palindrome.length ≤1000\leq 1000

  • palindrome consists of only lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Break a Palindrome

med
30 min
Try to solve the Break a Palindrome problem.

Statement

Given a palindromic string of lowercase English letters palindrome, replace exactly 11 character with any lowercase English letter such that the resulting string is not a palindrome and is the lexicographically smallest possible string.

Return the resulting string. If it is impossible to replace a single character to make the string not a palindrome, return an empty string "".

Constraints:

  • 1≤1 \leq palindrome.length ≤1000\leq 1000

  • palindrome consists of only lowercase English letters.