function firstUniqChar(s: string): string {
const map: { [key: string]: number } = Object.create(null);
for (const key of s) {
map[key] = (map[key] || 0) + 1;
}
for (const key in map) {
if (map[key] === 1) {
return key;
}
}
return ' ';
};