vovuhisback's blog

By vovuhisback, history, 6 years ago, In English

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?

Full text and comments »

  • Vote: I like it
  • +10
  • Vote: I do not like it