Problem editorialeasy
The longest palindrome you can build
You may rearrange freely — so positions stop mattering and counts take over. It becomes pure bookkeeping: how many pairs, plus one centre.
16 min read·time O(N)·space O(1) — fixed alphabet
CountingPairs plus a centreParity