The array to insert into
The element to insert
The starting index
Optional hi: anyThe end index to search within
The compare function to check for x
Checks whether x is a comparable type and returns the result of x.compare(y).
Otherwise the return value of the compare function is equivalent to obj === other ? 0 : obj < other ? -1 : 1
The comparison result
An initial value
Other value to compare
Generated using TypeDoc
Runs bisect first to locate an insertion point, and inserts the value
xin the sorted array after any existing entries ofxto maintain sort order. Please note this method isO(n)because insertion resizes the array.Returns