Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinarySearch ¶
func BinarySearch[T constraints.Ordered](slice []T, target T) bool
Time complexity of O(log n), which makes it much faster than linear (O(n)) search for large data sets. Only works correctly on sorted collections.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.