add: 三数之和

This commit is contained in:
yige committed 2020-06-12 14:50:11 +08:00
1 parent ada2de5c1a
commit fb6131a64e
3 files changed
+44

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
import { threeSum } from '../../src/math/3sum.js'
test('三数之和', () => {
expect(threeSum([-1, 0, 1, 2, -1, -4])).toEqual([
[-1, -1, 2],
[-1, 0, 1]
])
})