You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
557 B
TypeScript
13 lines
557 B
TypeScript
10 months ago
|
/**
|
||
|
* Add element to a sorted array
|
||
|
*/
|
||
|
export declare function addElementToSortedArray<T>(array: T[], element: T, compare: (a: T, b: T) => number): void;
|
||
|
/**
|
||
|
* Add element to a sorted array
|
||
|
*/
|
||
|
export declare function addElementsToSortedArray<T>(array: T[], elements: T[], compare: (a: T, b: T) => number): void;
|
||
|
/**
|
||
|
* Uses a binary search to determine the highest index at which value should be inserted into array in order to maintain its sort order.
|
||
|
*/
|
||
|
export declare function sortedLastIndex<T>(array: T[], compare: (target: T) => number): number;
|