Tap here to switch tabs
Problem
Submissions

Problem: Lexicographically Smallest Palindrome

med
30 min
Try to solve the Lexicographically Smallest Palindrome problem.

Statement

Given a string s consisting of lowercase English letters, you are allowed to perform operations where you replace any character in s with any lowercase English letter.

Find the lexicographically smallest palindrome that can be obtained using the minimum number of operations.

Return the resulting palindrome string.

Constraints:

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

  • s consists of only lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Lexicographically Smallest Palindrome

med
30 min
Try to solve the Lexicographically Smallest Palindrome problem.

Statement

Given a string s consisting of lowercase English letters, you are allowed to perform operations where you replace any character in s with any lowercase English letter.

Find the lexicographically smallest palindrome that can be obtained using the minimum number of operations.

Return the resulting palindrome string.

Constraints:

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

  • s consists of only lowercase English letters.