Skip to content

Commit 8278032

Browse files
committed
Runtime: 116 ms (Top 28.95%) | Memory: 42.6 MB (Top 45.11%)
1 parent 121d043 commit 8278032

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1+
// Runtime: 116 ms (Top 28.95%) | Memory: 42.6 MB (Top 45.11%)
12
var stringMatching = function(words) {
23
let res = [];
3-
4+
45
for (let i = 0; i < words.length; i++) {
5-
6+
67
for (let j = 0; j < words.length; j++) {
78
if (j === i) continue;
8-
9+
910
if (words[j].includes(words[i])) {
1011
res.push(words[i]);
1112
break;
1213
}
13-
14+
1415
}
1516
}
16-
17+
1718
return res;
18-
};
19+
};

0 commit comments

Comments
 (0)