For the First Bad Version problem, if the mid calculation is ''' int mid = (l + r)/2 ''' I am getting TLE. But if its ''' int mid = l + (r-l)/2 ''' then the code is accepted. Aren't both the calculations take the same amount of time?

Comments (1)