Hello All, I have doubt in Binary Search Algorithm. Like in yesterday's contest 417(Div. 2), there was a problem C Sagheer and Nubian Market . I saw in the editorial and many solutions of the top coders as well. Some people have started binary Search with while(low <= high) this condition, some have started with while(high — low > 1) this condition and some have did it with while(low < high) . I have a doubt, how do we decide that which loop condition we have to apply and how we get the answer ? Can somebody explain this with yesterday's C problem ! Link to the problem:- Link Thanks !