An odd count goes in the middle.
transcript
A code of letters. Can it be a palindrome? Rearrange the letters. Count them. It must read the same both ways. The middle takes one letter.
The code is a a b b c. A twice. B twice. C once. That is odd. One odd count is allowed. Pairs fit on both sides. Only the middle is single.
Put c in the middle. Put a pair on each side. A b c b a. It reads the same both ways. Every pair sits on both sides. The odd letter sits alone.
Count every letter. Allow at most one odd count. Do not demand all even counts. Odd lengths need one odd count. Test aab. It works. Even lengths allow no odd count. Case and spaces need a rule. One pass counts every letter. Constant space for a to z. Test aab and abc.
At most one odd. Full breakdown in the lecture.