Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update-binarysearch #185

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

update-binarysearch #185

wants to merge 3 commits into from

Conversation

Jay31kr
Copy link

@Jay31kr Jay31kr commented May 6, 2024

updated the binary search - changed the way of calculating mid so that it will not go out of range

rather than using mid = (start + mid)/2 using start + (end-start)/2 as in some cases (start + end) can be out of the range
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant