Skip to content

Commit 3af8518

Browse files
committed
반환 값이 없기 때문에 forEach로 변경
1 parent c1b622b commit 3af8518

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

group-anagrams/sonjh1217.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class Solution {
22
func groupAnagrams(_ strs: [String]) -> [[String]] {
33
var stringsByCount = [[Int]: [String]]()
44

5-
strs.map { str in
5+
strs.forEach { str in
66
var countsByAlphabet = Array(repeating: 0, count: 26)
77
for char in str.unicodeScalars {
88
countsByAlphabet[Int(char.value) - 97] += 1

0 commit comments

Comments
 (0)