We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7785c45 commit 9871f0bCopy full SHA for 9871f0b
valid-anagram/oyeong011.cpp
@@ -0,0 +1,10 @@
1
+class Solution {
2
+public:
3
+ bool isAnagram(string s, string t) {
4
+ unordered_map<char, int> ss, tt;
5
+ if(s.length() != t.length())return false;
6
+ for(auto i : s) ss[i]++;
7
+ for(auto i : t) tt[i]++;
8
+ return ss == tt;
9
+ }
10
+};
0 commit comments