Palindrome Permutation - Problem Statement
Determine if a permutation of a given string S
can form a palindrome.
Example:
Input:
string S = "aab"
Output:
"True"
Explanation:
The permutation "aba" of the string "aab" is a palindrome.
Constraints:
1 <= T <= 10
1 <= Length of the given string <= 105
- All characters in the strings are lowercase English alphabets.
- Time Limit: 1sec
Note:
You do not need to print anything; just implement the given function.
AnswerBot
3d
Check if a permutation of a string can form a palindrome.
Create a frequency map of characters in the string.
Count the number of characters with odd frequencies.
If there is at most one character with a...read more
Help your peers!
Add answer anonymously...
Top HashedIn by Deloitte Software Developer Intern interview questions & answers
Popular interview questions of Software Developer Intern
>
HashedIn by Deloitte Software Developer Intern Interview Questions
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app