Skip to content

BinarySearchTreeOptions

BinarySearchTreeOptions<T> = object

Defined in: packages/data/src/tree/binary-search-tree.ts:18

T

optional comparator?: Comparator<T>

Defined in: packages/data/src/tree/binary-search-tree.ts:27

The ordering. Must be a strict weak ordering and exact — a tolerant comparison is not transitive, which makes every result below unspecified rather than merely imprecise.

Defaults to ascending natural order via <, which is correct for numbers, strings and anything else with a sensible relational operator.