Easiest Solution || 96% Beats || JavaScript || o(n)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n/**\n * @param {string} s\n * @return {number}\n */\nvar longestPalindrome = function(s) {\n    let obj ={};\n    let answer=0;\n    for(let c of s){\n        if(!obj[c]){\n                obj[c]=1;\n        }\n        else\n             obj[c]++;\n    if(obj[c]%2===0){\n        answer += 2;\n    }\n    }\n  return s.length>answer ? answer+1 :answer;  \n};\n```
['Hash Table', 'JavaScript']