How efficient is binary search?



How efficient is binary search?..

Answer / Sweety Kumari

Binary Search is an extremely efficient search algorithm when the data is sorted. It has a time complexity of O(log n) in the average and worst cases, where n is the number of elements in the array. However, it requires the input array to be sorted beforehand.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

What is array traversing?

1 Answers  


What are the basic operations of stack?

1 Answers  


Why are b trees used?

1 Answers  


List the data structures which are used in rdbms.

1 Answers  


What is numeric array?

1 Answers  


Define an algorithm. What are the types of algorithms?

1 Answers  


Define graph?

1 Answers  


What are the disadvantages of using collection classes over arrays?

1 Answers  


Difference between hashset and treeset?

1 Answers  


Define distributed query and linked server?

1 Answers  


If you are using c language to implement the heterogeneous linked list, explain what pointer type will you use?

1 Answers  


Define a priority queue?

1 Answers  


Categories