[LeetCode C++] 387. 字符串中的第一个唯一字符_c++力扣 387字符串中的第一个唯一字符_超级大洋葱806的博客-CSDN博客

网站介绍:来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/first-unique-character-in-a-string/题目:方法一:使用哈希表存储频数class Solution {public: int firstUniqChar(string s) { unordered_map<int, int> frequency; for (char ch: s) { ++_c++力扣 387字符串中的第一个唯一字符