-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
68 lines (47 loc) · 2.01 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
declare module "effortless-algorithm" {
//* Sorting algorithms
export function quickSort(arr: (string | number)[]): (number | string)[];
export function mergeSort(arr: (string | number)[]): (string | number)[];
export function heapSort(arr: (string | number)[]): (string | number)[];
export function insertionSort(arr: (string | number)[]): (string | number)[];
export function timSort(arr: (string | number)[]): (string | number)[];
export function selectionSort(arr: (string | number)[]): (string | number)[];
export function shellSort(arr: (string | number)[]): (string | number)[];
export function bubbleSort(arr: (string | number)[]): (string | number)[];
export function treeSort(arr: (string | number)[]): (string | number)[];
export function cycleSort(arr: (string | number)[]): (string | number)[];
export function strandSort(arr: (string | number)[]): (string | number)[];
export function cocktailShakerSort(
arr: (string | number)[]
): (string | number)[];
export function combSort(arr: (string | number)[]): (string | number)[];
export function gnomeSort(arr: (string | number)[]): (string | number)[];
export function oddEvenSort(arr: (string | number)[]): (string | number)[];
export function bogoSort(arr: (string | number)[]): (string | number)[];
//* Search algorithms
export function linearSearch(
arr: number[] | string[],
target: number | string
): number;
export function sentinelLinearSearch(
arr: number[] | string[],
target: number | string
): number;
export function binarySearch(
arr: number[] | string[],
target: number | string
): number;
export function ternarySearch(
arr: number[] | string[],
target: number | string
): number;
export function jumpSearch(
arr: number[] | string[],
target: number | string
): number;
export function interpolationSearch(arr: number[], target: number): number;
export function exponentialSearch(
arr: number[] | string[],
target: number | string
): number;
}