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 50ea04c commit 942ff43Copy full SHA for 942ff43
valid-anagram/doitduri.swift
@@ -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