You are not logged in. Please login at www.codechef.com to post your questions!

×

spoj books1

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

khooni_khopri's gravatar image

2★khooni_khopri
127314
accept rate: 0%


Go through the following article on binary search:

http://help.topcoder.com/data-science/competing-in-algorithm-challenges/algorithm-tutorials/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.

link

answered 28 Oct '14, 18:38

aakashc31's gravatar image

4★aakashc31
22134
accept rate: 27%

Thanks a lot.

gotcha.

(31 Oct '14, 12:38) khooni_khopri2★
toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,138
×1,056

question asked: 28 Oct '14, 15:40

question was seen: 4,405 times

last updated: 31 Oct '14, 12:42