class Solution {
public:
int FirstNotRepeatingChar(string str) {
int len = str.size();
for (int i = 0; i < len; i++) {
if (str.find_first_of(str[i]) == str.find_last_of(str[i])) {
return i;
}
}
return -1;
}
};