Palindrome Anagram
InterviewTime limit1sMemory limit1024 MB
Decide whether swaps between the left and right halves can turn a string into a palindrome, given that the middle character stays fixed for odd N.
Problem
A palindrome is a string that reads the same forwards and backwards. For example, radar is a palindrome, but konkuk is not. You are given a string of length made only of lowercase English letters. Can you make a palindrome by performing the following operation zero or more times? Pick one of the first characters on the left and one of the last characters on the right, then swap their positions.
Input
The first line contains an integer , the length of the string. The second line contains the string of length , made only of lowercase English letters.
Output
If can be made a palindrome with zero or more operations, print Yes. Otherwise, print No.
Hint
is rounded down to the nearest integer. For example, is .