Skip to content

Commit d5edb46

Browse files
yanglbmeidoocs
authored andcommitted
style: format code and docs with prettier
1 parent 37e529a commit d5edb46

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

solution/0900-0999/0916.Word Subsets/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -261,26 +261,26 @@ function wordSubsets(words1: string[], words2: string[]): string[] {
261261
* @param {string[]} words2
262262
* @return {string[]}
263263
*/
264-
var wordSubsets = function(words1, words2) {
264+
var wordSubsets = function (words1, words2) {
265265
const cnt = Array(26).fill(0);
266-
266+
267267
for (const b of words2) {
268268
const t = Array(26).fill(0);
269-
269+
270270
for (const c of b) {
271271
t[c.charCodeAt(0) - 97]++;
272272
}
273-
273+
274274
for (let i = 0; i < 26; i++) {
275275
cnt[i] = Math.max(cnt[i], t[i]);
276276
}
277277
}
278278

279279
const ans = [];
280-
280+
281281
for (const a of words1) {
282282
const t = Array(26).fill(0);
283-
283+
284284
for (const c of a) {
285285
t[c.charCodeAt(0) - 97]++;
286286
}
@@ -299,7 +299,7 @@ var wordSubsets = function(words1, words2) {
299299
}
300300

301301
return ans;
302-
}
302+
};
303303
```
304304

305305
<!-- tabs:end -->

solution/0900-0999/0916.Word Subsets/README_EN.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -256,26 +256,26 @@ function wordSubsets(words1: string[], words2: string[]): string[] {
256256
* @param {string[]} words2
257257
* @return {string[]}
258258
*/
259-
var wordSubsets = function(words1, words2) {
259+
var wordSubsets = function (words1, words2) {
260260
const cnt = Array(26).fill(0);
261-
261+
262262
for (const b of words2) {
263263
const t = Array(26).fill(0);
264-
264+
265265
for (const c of b) {
266266
t[c.charCodeAt(0) - 97]++;
267267
}
268-
268+
269269
for (let i = 0; i < 26; i++) {
270270
cnt[i] = Math.max(cnt[i], t[i]);
271271
}
272272
}
273273

274274
const ans = [];
275-
275+
276276
for (const a of words1) {
277277
const t = Array(26).fill(0);
278-
278+
279279
for (const c of a) {
280280
t[c.charCodeAt(0) - 97]++;
281281
}
@@ -294,7 +294,7 @@ var wordSubsets = function(words1, words2) {
294294
}
295295

296296
return ans;
297-
}
297+
};
298298
```
299299

300300
<!-- tabs:end -->

solution/0900-0999/0916.Word Subsets/Solution.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@
33
* @param {string[]} words2
44
* @return {string[]}
55
*/
6-
var wordSubsets = function(words1, words2) {
6+
var wordSubsets = function (words1, words2) {
77
const cnt = Array(26).fill(0);
8-
8+
99
for (const b of words2) {
1010
const t = Array(26).fill(0);
11-
11+
1212
for (const c of b) {
1313
t[c.charCodeAt(0) - 97]++;
1414
}
15-
15+
1616
for (let i = 0; i < 26; i++) {
1717
cnt[i] = Math.max(cnt[i], t[i]);
1818
}
1919
}
2020

2121
const ans = [];
22-
22+
2323
for (const a of words1) {
2424
const t = Array(26).fill(0);
25-
25+
2626
for (const c of a) {
2727
t[c.charCodeAt(0) - 97]++;
2828
}
@@ -41,4 +41,4 @@ var wordSubsets = function(words1, words2) {
4141
}
4242

4343
return ans;
44-
}
44+
};

0 commit comments

Comments
 (0)