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 4310183 commit 96ab933Copy full SHA for 96ab933
valid-anagram/yhkee0404.go
@@ -0,0 +1,11 @@
1
+func isAnagram(s string, t string) bool {
2
+ sRune := []rune(s)
3
+ tRune := []rune(t)
4
+ sort.Slice(sRune, func(i, j int) bool {
5
+ return sRune[i] < sRune[j]
6
+ })
7
+ sort.Slice(tRune, func(i, j int) bool {
8
+ return tRune[i] < tRune[j]
9
10
+ return string(sRune) == string(tRune)
11
+}
0 commit comments