典型并且基础的错误:
class Solution { public: //Insert one char from stringstream void Insert(char ch) { if(result[ch] == -1) result[ch] = index; else if(result[ch] >= 0) result[ch] = -2; index++; } //return the first appearence once char in current stringstream char FirstAppearingOnce() { char ch = '