字符流中第一個不重複的字符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
相關文章
相關標籤/搜索