10000 Improved 399 · jscrdev/LeetCode-in-TypeScript@30a024f · GitHub
[go: up one dir, main page]

Skip to content

Commit 30a024f

Browse files
committed
Improved 399
1 parent cb7fbd1 commit 30a024f

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/test/ts/g0301_0400/s0399_evaluate_division/solution.test.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,46 @@ import { expect, test } from 'vitest'
44

55
test('calcEquation', () => {
66
const equations = [
7-
["a", "b"],
8-
["b", "c"]
7+
['a', 'b'],
8+
['b', 'c'],
99
] as [string, string][]
1010
const values = [2.0, 3.0]
1111
const queries = [
12-
["a", "c"],
13-
["b", "a"],
14-
["a", "e"],
15-
["a", "a"],
16-
["x", "x"]
12+
['a', 'c'],
13+
['b', 'a'],
14+
['a', 'e'],
15+
['a', 'a'],
16+
['x', 'x'],
1717
] as [string, string][]
1818
const expected = [6.0, 0.5, -1.0, 1.0, -1.0]
1919
expect(calcEquation(equations, values, queries)).toEqual(expected)
2020
})
2121

2222
test('calcEquation2', () => {
2323
const equations = [
24-
["a", "b"],
25-
["b", "c"],
26-
["bc", "cd"]
24+
['a', 'b'],
25+
['b', 'c'],
26+
['bc', 'cd'],
2727
] as [string, string][]
2828
const values = [1.5, 2.5, 5.0]
2929
const queries = [
30-
["a", "c"],
31-
["c", "b"],
32-
["bc", "cd"],
33-
["cd", "bc"]
30+
['a', 'c'],
31+
['c', 'b'],
32+
['bc', 'cd'],
33+
['cd', 'bc'],
3434
] as [string, string][]
3535
const expected = [3.75, 0.4, 5.0, 0.2]
3636
expect(calcEquation(equations, values, queries)).toEqual(expected)
3737
})
3838

3939
test('calcEquation3', () => {
40-
const equations = [["a", "b"]] as [string, string][]
40+
const equations = [['a', 'b']] as [string, string][]
4141
const values = [0.5]
4242
const queries = [
43-
["a", "b"],
44-
["b", "a"],
45-
["a", "c"],
46-
["x", "y"]
43+
['a', 'b'],
44+
['b', 'a'],
45+
['a', 'c'],
46+
['x', 'y'],
4747
] as [string, string][]
4848
const expected = [0.5, 2.0, -1.0, -1.0]
4949
expect(calcEquation(equations, values, queries)).toEqual(expected)

0 commit comments

Comments
 (0)
0