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;
}
};
242有効な文字の単語の異所性
おすすめ
転載: blog.csdn.net/include_not_found_/article/details/104896611
おすすめ
ランキング