242有効な文字の単語の異所性

class Solution {
public:
    bool isAnagram(string s, string t) {
        unordered_map<char, int> S, T;
        for(auto i : s) ++S[i];
        for(auto i : t) ++T[i];
        return S == T ? true : false;
    }
};
公開された21元の記事 ウォン称賛32 ビュー20000 +

おすすめ

転載: blog.csdn.net/include_not_found_/article/details/104896611