come back later

This commit is contained in:
Mark McGranaghan 2012-09-21 09:06:23 -07:00
parent 681f5df6c4
commit 046e4d3a20

View File

@ -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