I am new to competitive programming. I have learnt some algorithms. Now, I am learning Binary Search. But, I am founding it difficult to understand sometime. Sometimes I can't understand how binary search solved any problem. So, is there any tutorial that I can follow which will help me understand and implement Binary Search?

Binary Search – topcoder

There are so much information about that, the Topcoder tutorial is awesome, but if you want to have an idea why with binary search you can solve a problem, you can imagine that you have a big stick and you have to find something in that stick, so if you break the stick in a half, and in someway you know that you can drop one half and just search in the other half, then you have a smaller space where you have to search.

Applying the same principle many times you are gonna have a very small stick, where you can say if whatever you are searching is there or no.

I hope this help you a little bit

thank you so much

while there are tons of tutorials on the internet, me and my friend made a tutorial on it too. you might wanna check it out. Click

it is really good. Thanks for your tutorial.

Very useful stuff... As a beginner , I found it very helpful. Thank you so much.

Thanks bro it was really helpfull

Is it that difficult to google?

But I didn't get any good links. So I thought mybe you guyz can suggest me some links or tutorials.

Sometimes we dunno the keyword we need to search with. :)

May be this will be helpful to you.

u are a expert and you cant't understand binary search?

22 months ago...

When I wrote this blog I wasn't even a pupil if I remember correctly.