add: 寻找两个正序数组的中位数
This commit is contained in:
1 parent
c371738884
commit
581a96e795
3 files changed
+64
No files matched your search
@@ -0,0 +1,7 @@
|
||||
import { findMedianSortedArrays } from '../../src/math/median-of-two-sorted-arrays'
|
||||
|
||||
test('寻找两个正序数组的中位数', () => {
|
||||
expect(findMedianSortedArrays([], [1])).toBe(1.0)
|
||||
expect(findMedianSortedArrays([1, 3], [2])).toBe(2.0)
|
||||
expect(findMedianSortedArrays([1, 2], [3, 4])).toBe(2.5)
|
||||
})
|
||||
Reference in new issue
Block a user