mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-06 17:50:39 +08:00
feat: insertion sort with binary search (#1182)
This commit is contained in:
8
Sorts/test/BinaryInsertionSort.test.js
Normal file
8
Sorts/test/BinaryInsertionSort.test.js
Normal file
@ -0,0 +1,8 @@
|
||||
import { binaryInsertionSort } from '../BinaryInsertionSort'
|
||||
|
||||
describe('BinaryInsertionSort', () => {
|
||||
it('should sort arrays correctly', () => {
|
||||
expect(binaryInsertionSort([5, 4, 3, 2, 1])).toEqual([1, 2, 3, 4, 5])
|
||||
expect(binaryInsertionSort([7, 9, 4, 3, 5])).toEqual([3, 4, 5, 7, 9])
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user