Binary search works only on the sorted arrays so keep that in mind
- Install Golang
- Install this program by
git clone https://github.com/0xReflex/binary-search-go.git
ordownload the zip file of this program
- Nevigate to the folder with golang by
cd binary_search_go
- Compile this program by typing
go build binary_search.go
- Then run it by
./binary_search
- Install Golang
- Install this program by
git clone https://github.com/0xReflex/binary-search-go.git
ordownload the zip file of this program
- Nevigate to the folder with golang by
cd binary_search_go
- Compile this program by typing
go build binary_search.go
- Then run it by ~~
binary_search.exe
It will take your input for array length and the target you want to find. It will return -1 if the target is not in the array