class Solution {
public:
char firstUniqChar(string s) {
unordered_map<char, int> imap;
if(!s.empty()){
for(auto& c : s){
imap[c]++;
}
for(auto& c:s){
if(imap[c]==1){
return c;
}
}
}
return ' ';
}
};