List/binary_search library
🔍 Generic Binary Search Algorithm
Searches for a target value in a sorted list of Comparable elements. Returns the index of the element if found, otherwise returns -1.
Type T must implement Comparable.
Functions
-
binarySearch<
T extends Comparable> (List< T> list, T target) → int