Interview Query

Permutation Palindrome

Start Timer

0:00:00

Upvote
15
Downvote
Save question
Mark as completed
View comments (37)
Next question

Given a string str, write a function perm_palindrome to determine whether there exists a permutation of str that is a palindrome.

Example:

Input:

str = 'cacerra'
def perm_palindrome(str) -> True

“cacerra” returns True since it can be rearranged to form “racecar” which is a palindrome.

.
.
.
.
.


Comments

Loading comments