when we do while(low < high )
suppose i get answer at mid =( low + high ) / 2 ;
if i again set low to mid , then there is a possibility that it will go in infinite loop .
for example :
low = 4 , high = 5 mid = 4
now suppose if mid is true and we again set low = mid , then low will be again 4 and it will go into infinite loop . what to do in that case , should we set low = mid + 1 .
how to decide when to set low = mid and when low = mid + 1 .