adspace


Suppose that, even unrealistically, we are to search a list
of 700 million items using Binary Search, Recursion (the
algorithm given in class). What is the maximum number of
comparisons that this algorithm must perform before finding
a given item or concluding that it is not in the list?

Answer Posted / Nirmal Singh

In the worst-case scenario for binary search, when the searched item is at the end of the sorted list, the algorithm would need to perform log2(700 million) = 28 comparisons before finding the item or concluding that it is not in the list.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can u give me the information about the questions asked by the bally in campus

1959


what are the main points to be included in our introduction when asked in hr...??

2047


What is Campus selection process of patni at Adcet,Ashta at 24th dec 2010.Also give apti syllabus.

2511


Please explain why you are suitable for the position that you have applied for?

2124


I am looking for NIC Scientific Officer / Engineer-SB (Programmer)Sample papers or any portion of questions/ syllabus plz, send me on sengupta.pranab@gmail.com. Regards PRANAB

2461


I have applied for the post of Section Engineer. plz anyone send me the previous question paper. i did my engineering in Information Technology.

2087


What is the instruction to load the register B?

2444


plz snd me sbi probationofficers papers to my id archpa@gmail.com

2280


Hi i want some previous interview questions and answers for KVB Bank.

2710


What would be your first invention?

1261


why c is called middle level langauge?

2113


pls send me the e-book for verbal and non verbal reasoning of R S aggarwall

2315


Why do you want to work here

1839


i need the placement paper of ford IT service...

2092


What have you done to improve or develop your knowledge / professional qualifications in the last year?

2828