Given a string s, return the minimum number of moves required to transform s into a palindrome. In each move, you can swap any two adjacent characters in s.
Note: The input string is guaranteed to be convertible into a palindrome.
Constraints:
s.length
s consists of only lowercase English letters.
s is guaranteed to be converted into a palindrome in a finite number of moves.
Given a string s, return the minimum number of moves required to transform s into a palindrome. In each move, you can swap any two adjacent characters in s.
Note: The input string is guaranteed to be convertible into a palindrome.
Constraints:
s.length
s consists of only lowercase English letters.
s is guaranteed to be converted into a palindrome in a finite number of moves.