2023-10-20 03:43:26 +00:00
|
|
|
export type Comparator<T> = (a: T, b: T) => number;
|
|
|
|
|
|
|
|
export type DFSOrderPattern = 'pre' | 'in' | 'post';
|
2023-10-25 01:57:04 +00:00
|
|
|
|
2023-10-30 03:14:41 +00:00
|
|
|
export type BTNCallback<N, D = any> = (node: N) => D;
|
2023-10-25 01:57:04 +00:00
|
|
|
|
2023-10-25 03:19:03 +00:00
|
|
|
export enum CP {
|
|
|
|
lt = 'lt',
|
|
|
|
eq = 'eq',
|
|
|
|
gt = 'gt'
|
|
|
|
}
|
2023-11-17 14:37:35 +00:00
|
|
|
|
|
|
|
export interface IterableWithSize<T> extends Iterable<T> {
|
2023-11-19 01:04:48 +00:00
|
|
|
size: number | ((...args: any[]) => number);
|
2023-11-17 14:37:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IterableWithLength<T> extends Iterable<T> {
|
2023-11-19 01:04:48 +00:00
|
|
|
length: number | ((...args: any[]) => number);
|
2023-11-17 14:37:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export type IterableWithSizeOrLength<T> = IterableWithSize<T> | IterableWithLength<T>
|
2023-11-21 09:30:57 +00:00
|
|
|
|
|
|
|
export type BinaryTreePrintOptions = {isShowUndefined?: boolean, isShowNull?: boolean, isShowRedBlackNIL?: boolean}
|