export type BSTVariant = 'STANDARD' | 'INVERSE'; export type CP = 'LT' | 'EQ' | 'GT'; /** * Enum representing different loop types. * * - `iterative`: Indicates the iterative loop type (with loops that use iterations). * - `recursive`: Indicates the recursive loop type (with loops that call themselves). */ export type IterationType = 'ITERATIVE' | 'RECURSIVE'; export type FamilyPosition = 'ROOT' | 'LEFT' | 'RIGHT' | 'ROOT_LEFT' | 'ROOT_RIGHT' | 'ISOLATED' | 'MAL_NODE'; export type Comparator = (a: K, b: K) => number; export type DFSOrderPattern = 'PRE' | 'IN' | 'POST'; export type NodeDisplayLayout = [string[], number, number, number]; export type BTNCallback = (node: N) => D; export interface IterableWithSize extends Iterable { size: number | ((...args: any[]) => number); } export interface IterableWithLength extends Iterable { length: number | ((...args: any[]) => number); } export type IterableWithSizeOrLength = IterableWithSize | IterableWithLength; export type BinaryTreePrintOptions = { isShowUndefined?: boolean; isShowNull?: boolean; isShowRedBlackNIL?: boolean }; export type BTNEntry = [K | null | undefined, V | undefined]; export type BTNKeyOrNode = K | null | undefined | N; export type KeyOrNodeOrEntry = BTNEntry | BTNKeyOrNode; export type BTNodePureKeyOrNode = K | N; export type BTNodePureExemplar = [K, V | undefined] | BTNodePureKeyOrNode; export type BSTNKeyOrNode = K | undefined | N; export type BinaryTreeDeleteResult = { deleted: N | null | undefined; needBalanced: N | null | undefined }; export type CRUD = 'CREATED' | 'READ' | 'UPDATED' | 'DELETED';