Skip to content
RED SAGSkills
easy5 pts · first answer countsarraysbinary-searchoverflow

Safe midpoint in binary search

In Java or C++, why is mid = lo + (hi - lo) / 2 preferred over (lo + hi) / 2?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions