apply-hooks
Version:
A high-quality & reliable JavaScript Hooks library.
27 lines (26 loc) • 595 B
TypeScript
/**
* 1. 冒泡排序
* 2. 选择排序
* 3. 插入排序
* 4. 希尔排序
* 5. 快速排序
* 6. 归并排序
*/
interface ISortFn {
(arr: number[]): number[];
}
declare const bubbleSort: ISortFn;
declare const selectionSort: ISortFn;
declare const insertionSort: ISortFn;
declare const hillSort: ISortFn;
declare const fastSort: ISortFn;
declare const mergeSort: ISortFn;
declare const useSort: () => {
bubbleSort: ISortFn;
selectionSort: ISortFn;
insertionSort: ISortFn;
hillSort: ISortFn;
fastSort: ISortFn;
mergeSort: ISortFn;
};
export default useSort;