9 lines
172 B
JavaScript
9 lines
172 B
JavaScript
|
import { threeSum } from '../../src/math/3sum.js'
|
||
|
|
||
|
test('三数之和', () => {
|
||
|
expect(threeSum([-1, 0, 1, 2, -1, -4])).toEqual([
|
||
|
[-1, -1, 2],
|
||
|
[-1, 0, 1]
|
||
|
])
|
||
|
})
|