50-2字符流中第一个只出现一次的字符

蠢题

class Solution
{
public:
    string s;
    int f[256]={0};
  //Insert one char from stringstream
    void Insert(char ch)
    {
         s+=ch;
        f[ch]++;
    }
  //return the first appearence once char in current stringstream
    char FirstAppearingOnce()
    {
        for(int i=0;i

你可能感兴趣的:(50-2字符流中第一个只出现一次的字符)