Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinarySearch ¶
func BinarySearch[T algorithms.Ordered](values []T, target T) int
return -1 of array if not found the target,result is different with sort.SearchInts 没有搜索到目标返回-1 与sort.SearchInts()行为不同,sort.SearchInts()返回元素插入位置,可能是len(values)
Types ¶
type SearchStringTestCase ¶
type SearchStringTestCase struct {
// contains filtered or unexported fields
}
type SearchTestCase ¶
type SearchTestCase struct {
// contains filtered or unexported fields
}
搜索测试用例
Click to show internal directories.
Click to hide internal directories.