C++ 代码
class Solution {
public:
char firstNotRepeatingChar(string s) {
int arr[122] = {0};
for(int i = 0; i < s.size(); ++i)
arr[s[i]]++;
for(int i = 0; i < s.size(); ++i)
if(arr[s[i]] == 1) return s[i];
return '#';
}
};