Skip to content

Commit 8a0c1fb

Browse files
committed
Runtime: 409 ms (Top 44.03%) | Memory: 65.6 MB (Top 60.70%)
1 parent 8fccb7b commit 8a0c1fb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/algorithms/W/Word Subsets/Word Subsets.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Runtime: 409 ms (Top 44.03%) | Memory: 65.6 MB (Top 60.70%)
12
var wordSubsets = function(words1, words2) {
23
this.count = Array(26).fill(0);
34
let tmp = Array(26).fill(0);
@@ -14,8 +15,8 @@ var wordSubsets = function(words1, words2) {
1415
};
1516

1617
function isSub(tmp){
17-
for(let i=0; i<26; i++)
18-
if(tmp[i] < this.count[i])
18+
for(let i=0; i<26; i++)
19+
if(tmp[i] < this.count[i])
1920
return false;
2021
return true;
2122
};
@@ -25,4 +26,4 @@ function counter(s){
2526
for(let c of s)
2627
tmp[c.charCodeAt() - 97]++;
2728
return tmp;
28-
};
29+
};

0 commit comments

Comments
 (0)