add: 寻找重复数
This commit is contained in:
6
test/array/find-the-duplicate-number.test.js
Normal file
6
test/array/find-the-duplicate-number.test.js
Normal file
@ -0,0 +1,6 @@
|
||||
import { findDuplicate } from '../../src/array/find-the-duplicate-number'
|
||||
|
||||
test('寻找重复数', () => {
|
||||
expect(findDuplicate([1, 3, 4, 2, 2])).toBe(2)
|
||||
expect(findDuplicate([3, 1, 3, 4, 2])).toBe(3)
|
||||
})
|
Reference in New Issue
Block a user