DIY: Palindrome Permutation

Solve the interview question "Palindrome Permutation" in this lesson.

Problem statement

You are given a string, s. Your task is to find whether or not a permutation of this string is a palindrome. You should return True if such a permutation is possible and False if it is not possible.

Input

The input is a string. The following are examples of input to the function:

# Sample Input 1
"peas"

# Sample Input 2
"abab"

Output

The output will either be True or False. The following are examples of the outputs:

# Sample Output 1
False

# Sample Output 2
True

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.