Skip to content

Commit 7e0c9a7

Browse files
authored
Update anagram-groups.md
1 parent 85eaa80 commit 7e0c9a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: articles/anagram-groups.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Solution:
99
for s in strs:
1010
sortedS = ''.join(sorted(s))
1111
res[sortedS].append(s)
12-
return res.values()
12+
return list(res.values())
1313
```
1414

1515
```java
@@ -149,7 +149,7 @@ class Solution:
149149
for c in s:
150150
count[ord(c) - ord('a')] += 1
151151
res[tuple(count)].append(s)
152-
return res.values()
152+
return list(res.values())
153153
```
154154
155155
```java
@@ -284,4 +284,4 @@ class Solution {
284284
* Time complexity: $O(m * n)$
285285
* Space complexity: $O(m)$
286286

287-
> Where $m$ is the number of strings and $n$ is the length of the longest string.
287+
> Where $m$ is the number of strings and $n$ is the length of the longest string.

0 commit comments

Comments
 (0)