You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overflow will be happen at this line because if end=2147483647 & start=214 then the sum of start+end will be overflow.
So try to use the following formula to prevent overflow - - > mid=start+((end-start)/2)
Overflow will be happen at this line because if
end=2147483647
&start=214
then the sum ofstart+end
will be overflow.So try to use the following formula to prevent overflow - - >
mid=start+((end-start)/2)
Data-Structures-and-Algorithms-in-cpp/SearchingAlgorithms/binary_search.cpp
Line 14 in 1d8ccd7
The text was updated successfully, but these errors were encountered: