题目描述
在一个字符串(1<=字符串长度<=10000,全部由字母组成)中找到第一个只出现一次的字符的位置。若为空串,返回-1。位置索引从0开始
1 class Solution { 2 public: 3 int FirstNotRepeatingChar(string str) { 4 if (str.length() == 0) 5 return -1; 6 unsigned int hashtable[256] = {0}; 7 for (int i = 0; str[i] != '