Neoalgo: Correcting binary search in C++

Created on 31 Dec 2020  路  6Comments  路  Source: TesseractCoding/NeoAlgo

馃悰 Bug Report

In C++ binary search code, mid=(lb+ub)/2. But if lb and ub are both near to INT_MAX then summing up them will give integer overflow. So I want to modify the code to avoid integer overflow.

Have you read the Contributing Guidelines on Pull Requests?

yes

DWOC bug easy urgent

All 6 comments

Please assign this to me and label it for Devscript winter of code.

please assign to me

I created the issue and I can solve it... assign it to me 馃榾

assigned @djm-1

Thank you ma'am

Please label the difficulty

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HarshCasper picture HarshCasper  路  9Comments

Joshitha18 picture Joshitha18  路  7Comments

HarshCasper picture HarshCasper  路  9Comments

ashwanisng picture ashwanisng  路  7Comments

keshav304 picture keshav304  路  7Comments