题目:在字符串中找出第一个只出现一次的字符。如“abaccdeff”,则输出‘b'。
解法一:暴力搜索,时间复杂度为O(N2)
解法二:利用hash表,时间复杂度为O(N),空间复杂度为O(N)
1 char firstNotRepeatChar(string&str) 2 { 3 if (str.size()==0) 4 return '