https://github.com/mxssl/binarysearchgolangiteratively
Binary Search algorithm implemented in Go (Golang) by using iteration.
https://github.com/mxssl/binarysearchgolangiteratively
algorithm go golang
Last synced: 8 months ago
JSON representation
Binary Search algorithm implemented in Go (Golang) by using iteration.
- Host: GitHub
- URL: https://github.com/mxssl/binarysearchgolangiteratively
- Owner: mxssl
- Created: 2018-09-09T17:40:16.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-09T17:41:01.000Z (about 7 years ago)
- Last Synced: 2025-01-22T19:21:36.735Z (10 months ago)
- Topics: algorithm, go, golang
- Language: Go
- Size: 1000 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Binary Search
[Binary Search](https://en.wikipedia.org/wiki/Binary_search_algorithm) algorithm implemented in Go (Golang) by using iteration.
`Time Complexity: O(log(n))`
`Space Complexity: O(1)`
```Bash
$ go test -v -cover ./...
=== RUN TestCase1
Expected: 3, Output: 3
--- PASS: TestCase1 (0.00s)
=== RUN TestCase2
Expected: -1, Output: -1
--- PASS: TestCase2 (0.00s)
PASS
coverage: 78.6% of statements
ok github.com/mxssl/BinarySearchGolangIteratively 0.156s coverage: 78.6% of statements
```