← Back to challenges

Palindromic Anagrams

PythonHardalgorithmsstringsvalidation

Instructions

Given a word, create a function which returns whether or not it's possible to create a palindrome by rearranging the letters in the word.

Examples

is_palindrome_possible("rearcac") ➞ True
# You can make "racecar"

is_palindrome_possible("suhbeusheff") ➞ True
# You can make "sfuehbheufs" (not a real word but still a palindrome)

is_palindrome_possible("palindrome") ➞ False
# It's impossible

Notes

  • Trivially, words which are already palindromes return True.
  • Words are given in all lowercase.
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.