lowerBound MethodProtected

Computes the position at which the specified key should be inserted to maintain sorted order.

lowerBound(key: K): { equal: boolean, index: number }

Parameter Type Description
key K The key whose position is to be computed.

Returns - { equal: boolean, index: number }

an object with 'index' corresponding to the computed position and 'equal' set to true if an equivalent key already exists at that index.

Defined in

Last Updated: 30 November, 2023