Palindromic Anagrams

Published by Matt in

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.
Watch a quick demo on how Edabit works.