Skip to content

Commit 9871f0b

Browse files
committed
valid-anagram sol
1 parent 7785c45 commit 9871f0b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

valid-anagram/oyeong011.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)