字符流中第一个不重复的字符c++

使用一个hash和字符串来记录过程 class Solution { public: map<char, int>M; string s=""; //Insert one char from stringstream void Insert(char ch) { s += ch; M[ch]++; } //return the first appearence once ch
相关文章
相关标签/搜索