Lisp Palindrome Rearranging
(defun palindrome-rearranging (input-string)
(let ((counts (make-hash-table :test 'eql))
(c 0))
(loop for ch across input-string
do (incf (gethash ch counts 0)))
(loop for v being the hash-values of counts
do (when (oddp v) (incf c)))
(<= c 1)))
This counts character frequency and checks whether the string has the right number of odd counts to form a palindrome.