https://github.com/theodesp/bisect
Package bisect implements common bisection algorithms in Go
https://github.com/theodesp/bisect
go sorting
Last synced: 7 days ago
JSON representation
Package bisect implements common bisection algorithms in Go
- Host: GitHub
- URL: https://github.com/theodesp/bisect
- Owner: theodesp
- License: mit
- Created: 2018-10-08T13:30:20.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-08T17:35:38.000Z (almost 7 years ago)
- Last Synced: 2025-07-08T15:04:13.098Z (7 days ago)
- Topics: go, sorting
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bisect
[](https://travis-ci.org/theodesp/bisect)
[](http://godoc.org/github.com/theodesp/bisect)
[](https://goreportcard.com/report/github.com/theodesp/bisect)Package bisect implements common bisection algorithms.
`go get -u github.com/theodesp/bisect`
## Examples
```go
package mainimport (
"github.com/theodesp/bisect"
"fmt"
)func main() {
var ints bisect.IntSlice
for i:=0;i<10;i += 2 {
ints = append(ints, i)
}ints.InsortLeft(-1)
ints.InsortRight(16)fmt.Println(ints) // [16 -1 0 2 4 6 8]
}
```[Read the package documentation for more information](https://godoc.org/github.com/theodesp/bisect).
## Contributing
We welcome pull requests, bug fixes and issue reports.
Before proposing a change, please discuss your change by raising an issue.## License
Copyright © 2017 Theo Despoudis MIT license