Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c89d935

Browse files
authored
Update 49.group-anagrams.md
1 parent e953ece commit c89d935

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

problems/49.group-anagrams.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ var groupAnagrams = function (strs) {
103103
for (let j = 0; j < str.length; j++) {
104104
counts[str[j].charCodeAt(0) - "a".charCodeAt(0)]++;
105105
}
106-
const key = counts.join("");
106+
const key = counts.join("-");
107107
if (!hashTable[key]) {
108108
hashTable[key] = [str];
109109
} else {

0 commit comments

Comments
 (0)