come back later
This commit is contained in:
parent
681f5df6c4
commit
046e4d3a20
@ -14,10 +14,6 @@ func main() {
|
||||
|
||||
s := sort.IntsAreSorted(ints) // Check if a slice is in sorted order.
|
||||
fmt.Println(s)
|
||||
|
||||
i := sort.SearchInts(ints, 4) // Binary-search a sorted slice for a value.
|
||||
fmt.Println(i) // Returns the index if found, or `-1` if not.
|
||||
fmt.Println(sort.SearchInts(ints, 5))
|
||||
}
|
||||
|
||||
/*
|
||||
@ -27,3 +23,6 @@ $ go run sort.go
|
||||
true
|
||||
1
|
||||
*/
|
||||
|
||||
// == todo
|
||||
// general and convenience searching
|
||||
|
Loading…
x
Reference in New Issue
Block a user