Question: Given a string s , print Yes if the string can be a palindrome after rearranging the letters in the String, else No

Given a string s, print "Yes" if the string can be a palindrome after rearranging the letters in the
String, else "No". Ignore the case.
A palindromic string is one that reads the same forwards and backwards, such as "radar" or
"level."
Input format
First line contains a string 's' consisting of uppercase and lowercase letters.
Output format
Print "Yes" if the string can be a palindrome after rearranging the letters in the string,
otherwise, print "No".
Sample Input 1
aAb
Sample Output 1
Yes
Explanation
Swapping 'A' and 'b' in the string will result in a palindromic string 'abA' ('a'='A' as we are
ignoring the case).
Sample Input 2
ABC
Sample Output 2
No
Explanation
"ABC" cannot be converted into a palindromic string.
Constraints
1 s.length 1000
Given a string s , print "Yes" if the string can

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!