Const
Alias for bisectRight.
Finds the rightmost insertion point for target in a sorted array.
target
If target exists, returns the index after any equal entries. (Like Python's bisect_right.)
bisect_right
Sorted array (ascending).
Value to locate.
Insertion index.
O(log n). Behavior is undefined if array is not sorted.
bisectRight([1, 2, 4, 4, 6], 4); // 4bisectRight([1, 2, 4, 4, 6], 3); // 2 Copy
bisectRight([1, 2, 4, 4, 6], 4); // 4bisectRight([1, 2, 4, 4, 6], 3); // 2
Alias for bisectRight.