I was reading about binary search...I know that the traditional way of finding mid value is like
mid=(hi+lo)/2
But i also see that to avoid overflow mid value is calculated like that
mid=lo+(hi-lo)/2
But why?? I couldn't find the actual reason..Can anyone give me the reason with example?? It is different from other question because other questions didn't have the answer that i wanted with example...