1、哈希表做法
class Solution {
public:
bool canPermutePalindrome(string s) {
int cnt=0;
int hash[256]={0};
for(int i=0;s[i];++i) ++hash[s[i]];
for(int i=0;i<256;++i) if(hash[i]&1) ++cnt;
if(cnt>1) return false;
else return true;
}
};