哈希表统计
class Solution { public: map<char,int>mp; char firstUniqChar(string s) { for(auto x:s)mp[x]++; string ans= " "; for(auto it:s) if(mp[it]==1){ ans=it; break; } return ans[0]; } };