Question link: here How can I apply Binary search in this question as stated by some person... please give solution or explanation.please... asked 28 Oct '14, 15:40

Go through the following article on binary search: If you have a fair idea of what binary search is, and can implement it, then it won't take long. There is an example given at the end of the article cited above, which is similar to the problem you have linked. P.S. The article is awesome. If you know the basics of binary search, you can skip the first half. I would suggest that you read the whole article. If you know it, it won't take long, otherwise you may have learned something unexpected. It gives you a new perspective to look at problems that can be solved using binary search. Read through other Topcoder algorithm tutorials, if you want to. answered 28 Oct '14, 18:38
