Binary Search

Good resources to learn and practice questions on Binary Search techniques? I see problems that need to be solved using this but I don’t get the intuition.

i need too :slight_smile: @anon55659401 @ssjgz

Codeforces :wink:

2 Likes

Whenever there is a situation where things are listed in ascending or descending order, and you need to find a particular thing from it. Then you can do that in logarithmic time. That’s one way i identify a binary search problem i.e monotonicity.

Sometimes it’s very obvious and sometimes it’s not, with practice and time you can identify it quickly.

Here are some easy binary search problems from Codeforces ( Mostly Div 2 B or C )

  1. Books

  2. Kefa and Company

P.S - These are not “only” binary search problems, but they can be solved using Binary Search. You know, you can get intuition from them which you’re looking for

2 Likes

This summerpark guy is so intelligent :heart_eyes:

1 Like

I’m just a 3 Star :joy:

So? Dont underestimate yourself :hugs:

3 Likes

These are the three resources that would teach you to harness true power of this technique and would save you from “off by one” errors in BS …
1) Topcoder Tutorial
2) Variants of binary search
3) Binary search in detail

1 Like