Binary Search Mid Value Updation

Revision en2, by vovuhisback, 2020-03-17 15:11:12

Hello Folks!

I am confused in updating mid value in binary search problems like sometimes (left+right)/2 results in infinite loop & sometimes (left+right+1)/2 results in infinite loop when updated with same left & right.

Any blog post on the same confusion?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English vovuhisback 2020-03-17 15:11:12 0 (published)
en1 English vovuhisback 2020-03-17 15:10:58 297 Initial revision (saved to drafts)