searching

package
v0.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinarySearch

func BinarySearch[T comparable](arr []T, target T, cmp func(T, T) bool) int

BinarySearch searches for the target in the array using binary search

func BinarySearchAuto

func BinarySearchAuto[T c.Ordered](arr []T, target T) int

BinarySearchAuto is a shorthand for BinarySearch that uses the default comparator

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL