Skip to content

mxssl/BinarySearchGolangIteratively

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Binary Search

Binary Search algorithm implemented in Go (Golang) by using iteration.

Time Complexity: O(log(n))

Space Complexity: O(1)

$ 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

About

Binary Search algorithm implemented in Go (Golang) by using iteration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages