Javascript, oddCount
\nvar longestPalindrome = function(s) {\n  const map = new Map()\n  for(const c of s){\n    map.set(c, (map.get(c) || 0) + 1)\n  }\n  let count = 0\n  let oddCo
```\nvar longestPalindrome = function(s) {\n  const map = new Map()\n  for(const c of s){\n    map.set(c, (map.get(c) || 0) + 1)\n  }\n  let count = 0\n  let oddCount = 0\n  for(const [k, v] of map){\n    if(v % 2 === 0){\n      count+=v\n    }else{\n      count+=v\n      oddCount++\n    }\n  }\n\n  return oddCount ? count - oddCount + 1 : count\n};\n```
['JavaScript']