Skip to content

Commit 942ff43

Browse files
committed
Solution Valid Anagram
1 parent 50ea04c commit 942ff43

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

valid-anagram/doitduri.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class Solution {
2+
func isAnagram(_ s: String, _ t: String) -> Bool {
3+
guard s.count == t.count else {
4+
return false
5+
}
6+
7+
return s.sorted() == t.sorted()
8+
}
9+
}

0 commit comments

Comments
 (0)