-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Description
Bug Report for https://neetcode.io/problems/is-anagram
I ran the following code but the cli gave this error:
# command-line-arguments
./main.go:-4:2: "reflect" imported and not used
^^^^^ i have no way to deal with that, as it is outside of my program.
func isAnagram(s string, t string) bool {
if len(s) != len(t) { return false }
store := make(map[rune]int)
for _, char := range s {
store[char] += 1
}
for _, char := range t {
store[char] -= 1
}
for _, v := range store {
if v != 0 { return false }
}
return true
}Metadata
Metadata
Assignees
Labels
No labels