Possible Palindrome

Published by Matt in

Create a function that determines whether it is possible to build a palindrome from the characters in a string.

Examples

possiblePalindrome("acabbaa") ➞ true
// Can make the following palindrome: "aabcbaa"

possiblePalindrome("aacbdbc") ➞ true
// Can make the following palindrome: "abcdcba"

possiblePalindrome("aacbdb") ➞ false

possiblePalindrome("abacbb") ➞ false

Notes

N/A

Watch a quick demo on how Edabit works.