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

×

Binary Search

Do you want to know about Binary Search? Do you want a right place to learn it? Open the link given below and get a right place :) My second blog post: http://sanugupta.wordpress.com/2014/06/05/linear-search-vs-binary-search/

asked 05 Jun '14, 21:11

saanc's gravatar image

5★saanc
6505721
accept rate: 0%


Write about thorough tutorial hashing and indexing then you will get some real traffic. ;)

I appreciate your Binary search tutorial

link

answered 24 Jun '14, 01:09

amitt001's gravatar image

2★amitt001
1.1k21430
accept rate: 6%

thanks buddy :)

(24 Jun '14, 23:45) saanc5★

will follow ur suggestion definitely

(24 Jun '14, 23:47) saanc5★

Your binary search function does not deal with integer overflow's while calculating mid, a very common mistake while implementing binary search when left and right are something like 60000, 65530 (assuming int to have range of 0-65535) now notice adding them would lead to an overflow and hence would give the wrong index.

link

answered 25 Jun '14, 00:05

u_seem_surprsd's gravatar image

5★u_seem_surprsd
527147
accept rate: 25%

1

Thanks bro...... Blog is updated now.... sorry for that :) ...

(25 Jun '14, 09:10) saanc5★

Algolist is helpful for yours.

topcoder tutorial is also helpful for yours.

Visualization of Binary Search Algorithm

link

answered 09 Nov '16, 14:27

rashedcs's gravatar image

2★rashedcs
49751755
accept rate: 4%

edited 09 Nov '16, 15:06

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,404
×1,038
×795
×706

question asked: 05 Jun '14, 21:11

question was seen: 1,752 times

last updated: 09 Nov '16, 15:06