Skip to content

Commit edc846a

Browse files
committed
美化
1 parent c62cbb6 commit edc846a

File tree

2 files changed

+3
-25
lines changed

2 files changed

+3
-25
lines changed

sum-of-prefix-scores-of-strings/test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
22
import sumPrefixScores from "./index.ts";
33
import sumPrefixScores2 from "./sumPrefixScores.ts";
44
Deno.test("sum-of-prefix-scores-of-strings", () => {
5-
testsumPrefixScores(sumPrefixScores);
5+
testSumPrefixScores(sumPrefixScores);
66
});
77
Deno.test("sum-of-prefix-scores-of-strings", () => {
8-
testsumPrefixScores(sumPrefixScores2);
8+
testSumPrefixScores(sumPrefixScores2);
99
});
1010

11-
function testsumPrefixScores(
11+
function testSumPrefixScores(
1212
sumPrefixScores: {
1313
(words: string[]): number[];
1414
},

word-search-ii/index.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,7 @@ function findWords(board: string[][], words: string[]): string[] {
3333
}
3434
});
3535

36-
// const mapper = new Map<string, Array<[number, number]>>();
3736
words = Array.from(ans);
38-
// for (let i = 0; i < row; i++) {
39-
// for (let j = 0; j < col; j++) {
40-
// const v = board[i][j];
41-
// if (words.some((word) => v === word[0])) {
42-
// let list = mapper.get(v);
43-
// if (!list) {
44-
// list = [];
45-
// mapper.set(v, list);
46-
// }
47-
// list.push([i, j]);
48-
// }
49-
// }
50-
// }
5137

5238
const result = new Set<string>();
5339

@@ -65,14 +51,6 @@ function findWords(board: string[][], words: string[]): string[] {
6551
}
6652
}
6753
}
68-
// for (const word of ans) {
69-
// if (!result.has(word) && mapper.has(word[0])) {
70-
// for (const [i, j] of mapper.get(word[0]) || []) {
71-
// if (!result.has(word) && !visited[i][j])
72-
// dfs(i, j, visited, board, row, col, "", root, result);
73-
// }
74-
// }
75-
// }
7654

7755
return Array.from(result);
7856
}

0 commit comments

Comments
 (0)