-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Description
Bug Report for https://neetcode.io/problems/is-anagram
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
When I ran the solution for anagram is gives this error:
Steps:
- User following code
func isAnagram(s string, t string) bool {
if len(s) != len(t) {
return false
}
countS, countT := make(map[rune]int), make(map[rune]int)
for i, ch := range s {
countS[ch]++
countT[rune(t[i])]++
}
for k, v := range countS {
if countT[k] != v {
return false
}
}
return true
}- Run it
Metadata
Metadata
Assignees
Labels
No labels