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;
}
};
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;
}
};

被折叠的 条评论
为什么被折叠?