Skip to content

Commit 21ceeb5

Browse files
Update challenge-6/submissions/shansing/solution-template.go
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 0b993d8 commit 21ceeb5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

challenge-6/submissions/shansing/solution-template.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ func CountWordFrequency(text string) map[string]int {
2626
for _, word := range words {
2727
normalized := strings.ToLower(word)
2828
normalized = strings.ReplaceAll(normalized, "'", "")
29+
if normalized == "" {
30+
continue
31+
}
2932
countMap[normalized]++
3033
}
3134
return countMap
35+
}
3236
}

0 commit comments

Comments
 (0)