分門別類刷leetcode——哈希表與字符串(C++實現)

複習哈希表       使用哈希統計字符串中的字符個數 #include<stdio.h> #include<string> int main(int argc, char *argv[]) { int char_map[128] = { 0 }; std::string str = "abcdefgaaxxy"; for (auto i : str) { char_map[i]++;
相關文章
相關標籤/搜索