mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2026-03-13 15:21:15 +08:00
merge: Bubble Sort enhancements for nearly sorted or sorted array, added test cases and documentation (#895)
* BubbleSort enacements for nearly sorted or sorted array and added test cases * BubbleSort enacements for nearly sorted or sorted array and added test cases * Bubble sort requested changes solved * standard js style issue fixed
This commit is contained in:
@@ -6,6 +6,7 @@ describe('bubbleSort', () => {
|
||||
expect(bubbleSort([])).toEqual([])
|
||||
expect(bubbleSort([1, 2, 3])).toEqual([1, 2, 3])
|
||||
expect(bubbleSort([5, 6, 7, 8, 1, 2, 12, 14])).toEqual([1, 2, 5, 6, 7, 8, 12, 14])
|
||||
expect(bubbleSort([5, 6, 7, 8, 9, 4])).toEqual([4, 5, 6, 7, 8, 9])
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user