Closed mohanadtalat91 closed 2 years ago
Hello @mohanadtalat91,
Thank you for opening an issue. :partying_face:
To get assigned to this particular issue please use /assign
Check this guide before contributing.
/assign
Please reopen this issue once you add more information and updates here. If this is not the case and you need some help, feel free to seek help from our Telegram or ping one of the reviewers. Thank you for your contributions!
https://github.com/HarshCasper/NeoAlgo/blob/4f1e5bdd6d9d899fa354de94740e0aecf5ecd2be/Go/search/binary_search/binary_search.go#L24
Here is a bug at the above line, which will case an overflow if
low = 10^9
andhigh = 1
, because10^9 + 1
will cause overflow. So it must below + (high-low)/2
instead of(high+low) / 2
.