Skip to content

Commit edb98f5

Browse files
committed
Runtime: 144 ms (Top 34.85%) | Memory: 45.3 MB (Top 50.00%)
1 parent b2b53df commit edb98f5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1+
// Runtime: 144 ms (Top 34.85%) | Memory: 45.3 MB (Top 50.00%)
12
/**
23
* @param {string[]} words
34
* @return {boolean}
45
*/
56
var makeEqual = function(words) {
6-
7-
7+
88
let length = words.length
9-
9+
1010
let map = {}
1111
for( let word of words ) {
1212
for( let ch of word ) {
13-
map[ch] = ( map[ch] || 0 ) + 1
13+
map[ch] = ( map[ch] || 0 ) + 1
1414
}
1515
}
16-
16+
1717
for( let key of Object.keys(map)) {
1818
if( map[key] % length !=0 ) return false
1919
}
20-
20+
2121
return true
22-
23-
};
22+
23+
};

0 commit comments

Comments
 (0)